Project

General

Profile

Actions

Feature #5239

closed

/sockopen add new parameter -C; $sock() add new property .certfile

Added by westor (GR) almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
02/11/2021
Due date:
% Done:

0%

Estimated time:
Operative System:
All

Description

Hello,

I wanna suggest a new flag -C for /sockopen command that would be able to use a specific cert file for that connection.

Usage : /sockopen -C test <address> <port> <cert file>
Examples : /sockopen -Ce test adiirc.com 443 mycert.pfx

Code Example:


alias example {
  sockclose IRC
  sockopen -eC IRC irc.freenode.org 6697 $qt($adiircdir $+ freenode.pfx)
}

on *:sockopen:IRC: {
  if ($sockerr) { return }

  sockwrite -nt IRC NICK Tester $+ $rand(1,100)
  sockwrite -nt IRC USER Tester $+ $rand(1,100) 0 * :mSL Testing

  if ($window(@IRC)) { window -c $v1 }

  window -de @IRC
  aline @IRC $sock($sockname).addr $+ : $+ $sock($sockname).port using $sock($sockname).cert certification file.
}

on *:sockread:IRC: {
  if ($sockerr) { return }

  var %x
  sockread %x

  aline -p @IRC $iif(%x,$v1,-)
}

- Thanks!

Actions

Also available in: Atom PDF