Project

General

Profile

Actions

Feature #5239

closed

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

Added by westor (GR) about 3 years ago. Updated about 3 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 #1

Updated by Per Amundsen about 3 years ago

  • Status changed from New to Rejected

That wont work, the server provides the certificate, not the client.

Actions #2

Updated by westor (GR) about 3 years ago

Probably you have been miss understood my suggestion , apologize if i was not clear and sorry if i being rude on this.

I meant -C <cert file> would be use the Private Key File .

Actions #3

Updated by Per Amundsen about 3 years ago

  • Subject changed from /sockopen -C <cert> and $sock().cert to /sockopen add new parameter -C; $sock() add new property .certfile
  • Status changed from Rejected to Resolved

Okay that's different, I added that for next beta.

Actions #4

Updated by Per Amundsen about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF