-
Notifications
You must be signed in to change notification settings - Fork 372
use starttls / enable tls_verify #1170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
might still be good to use it rather than nothing? sts is currently not possible to implement until they finish the sts host port spec: ircv3/ircv3-specifications#390 |
Ugh that one. It's definitely possible to implement without it on our side, that issue just means freenode won't deploy a sts policy on their server without it. Also, the blocker there is because of certificate validation of the hostname. If that doesn't affect this code, then that means this never validates hostnames. |
of course the verification would fail if the hostname was validated. the users can control this with -tls_verify (in theory) |
So if i'm reading this right, this defaults to starttls for every server that doesn't have
|
Thanks for taking your time to read through this. in my testing, I found that Afternet offers STARTTLS based on the older spec, without announcing it in CAP LS. A CAP-based STARTTLS would be possible but a bit more work. Note that there is no way to support pre-CAP starttls without best effort and delay, or an explicit request from the user as far as I know. If we want to store the availability of starttls, then we will have to implement some more code in the SERVER_CONNECT_REC, likely similar in what would need to be done for an eventual sts implementation |
we have another related issue which is waiting for the cap ls reply. currently, Irssi will send CAP LS and NICK and USER, thus allowing us to log in. If I wait for CAP LS in order to send STARTTLS, I will move the 8 second delay for the starttls response to an 8 second delay for the CAP LS response. I don't see any other way, you? The main concern here would be to avoid delaying connections to IRCnet for no reason, which supports neither STARTTLS nor CAP LS (but does support TLS on port 6667) |
Yeah. I would ignore this pre-CAP starttls entirely, it's not worth the hassle
If the server isn't known to have STARTTLS, send the usual, and if there's a CAP LS response that happens to contain tls, upgrade. If the server is known to have STARTTLS, then it should be sent right away as the first thing (anything else is a plaintext leak), and if the server doesn't reply to it, that should kill the connection. That should be the only timeout needed, which I think we already have (the server will also be happy to kick us for being quiet, too)
Wait is that a typo or a cursed ssl multiplexer? |
The problem with "send the usual" is that usually we send CAP LS / PASS / USER / NICK but we don't want to send that when we can upgrade to starttls or sts. but if servers do NOT support CAP LS, they will just stall us waiting for the registration sequence jess in #ircv3 told me that we may get an error out of servers if we send JOIN 0 as the first command question is if that is how we want to proceed? yes some ircnet servers are running ssl multiplex, try /connect -tls eu.irc6.net 6667 :-) |
I have implemented this idea now |
after some playing with it I think I'm too stupid to properly stuff the left-over read buffer into the SSL context. maybe starttls was a stupid idea to begin with @ahf you wouldn't know how to achieve this feat? |
the attached [wip] commit stores the starttls state in the config iff the user has registered this server. (otherwise until a reconnect) unfortunately, I cannot get |
fwiw, today /connect -starttls irc.afternet.org does work |
3559154
to
8ad2a0e
Compare
|
48a8c01
to
3de3bfb
Compare
implemented the suggestions by ahf |
@irssi/developers |
No description provided.