lizmat / IRC-Client

Raku module for building IRC (Internet Relay Chat) clients
Artistic License 2.0
15 stars 8 forks source link

Feature request - allow to disable ssl verification #68

Open melezhik opened 1 year ago

melezhik commented 1 year ago

Hi! For IRC proxy services (like ZNC) with self signed ssl certificates maybe it's make a sense to disable ssl versification ?

Right now I do quick and dirty patch:

diff --git a/lib/IRC/Client.rakumod b/lib/IRC/Client.rakumod
index 044ec02..c585106 100644
--- a/lib/IRC/Client.rakumod
+++ b/lib/IRC/Client.rakumod
@@ -522,9 +522,10 @@ method !connect-socket($server --> Nil) {
       ?? IO::Socket::Async::SSL.connect(
            $server.host,
            $server.port,
-           ca-file => $server.ca-file
+           ca-file => $server.ca-file,
+           :insecure
          )
-      !! IO::Socket::Async.connect($server.host, $server.port);
+      !! IO::Socket::Async.connect($server.host, $server.port, :insecure);