Actions
Feature #5239
closed
W(
PA
/sockopen add new parameter -C; $sock() add new property .certfile
Feature #5239:
/sockopen add new parameter -C; $sock() add new property .certfile
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