jnthn / p6-io-socket-async-ssl

Asynchronous TLS sockets in Raku
11 stars 19 forks source link

WIP: Supply cert for client #41

Open Tyil opened 5 years ago

Tyil commented 5 years ago

This is still a WIP, since there's still a failing test left!

I'm looking to implement certfp functionality into IRC::Client, and after some reading and discussing I've found that this requires support for SSL_CTX_use_certificate_file. This is already available on .listen, but not yet for .connect. This PR intends to make such functionality available for .connect as well.

The command-line version of this option would be -cert, which can be used as follows:

openssl s_client \
    -connect testnet.darenet.org:6697 \
    -servername testnet.darenet.org \
    -cert client-cert.pem

Now, I'm not terribly familiar with this particular module, or ssllib in general, so any feedback would be greatly appreciated.