aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
533 stars 98 forks source link

Allow invalid certificates #230

Closed PurpleMyst closed 2 years ago

PurpleMyst commented 3 years ago

As per the title, I'd enjoy it if there were an option to allow invalid certificates when connecting over TLS, as I believe this to be an use-case for connecting to a ZNC bouncer that has its own, self-signed, certificate, created by znc --makecert (or something of the like, I'm not sure that that's the right flag).

Currently, I get an error even if I convert the znc.pem into a znc.der and pass it in in the config.

8573 commented 3 years ago

I don't know that I'd call self-signed certificates "invalid". I think it would be appropriate to have an option to accept any certificate with a fingerprint in a given list of fingerprints, so one would provide the fingerprint of one's self-signed certificate, just as often is done with certificate authentication to IRC services.

dabukalam commented 3 years ago

I've run into this issue today as well, while trying to use https://github.com/nuxeh/url-bot-rs. Allowing self-signed certs somehow is def a good feature request.

simnalamburt commented 2 years ago

Duplicate of https://github.com/aatxe/irc/issues/209

simnalamburt commented 2 years ago

FYI, I've made a PR for this issue: https://github.com/aatxe/irc/pull/236

ghost commented 2 years ago

Hey, I second this and in the meantime I've just switched to tracking @simnalamburt's upstream:

irc = { git = "https://github.com/simnalamburt/irc.git", branch = "dangerously-accept-invalid-certs" }

https://github.com/clandestinenetworks/roobot/blob/master/src/main.rs#L15

and it seems to work just fine. thanks!

quite commented 2 years ago

Closed by #236 it seems