-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add tls.handshake_match.version matcher #155
base: master
Are you sure you want to change the base?
Conversation
agittins
commented
Nov 4, 2023
- creates a new matcher, tls.handshake_match.version
- based heavily on the alpn matcher.
Fixes #119 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
Since the TLS handshake hasn't been completed yet, a version hasn't actually been chosen. This only matches versions the client advertises support for. Is that intentional? If so, we should probably update the godoc to clarify.
Normally I suppose we'd just put this in the tls
app package directly, but that's not strictly required and this is the only request I've had for it, so maybe keeping it in this separate module is better for now.
That's a good point - the idea is to match against versions the client supports (and especially those which the tls app doess not support), but it should probably be more specific - in my case I have clients that only support TLS 1.0, so that's what I was looking for - but yes the more general case is that clients offer a max version or a list. I think even for my use-case I should be checking for "clients that support a max_version of tls1.0", since I don't want to redirect old browsers etc that support newer versions but still offer support of 1.0. I might give this a bit more thought but if you have time to offer some insight it would be more than welcome. |
Huh, that's super weird. I admit I don't know. Go doesn't support SSLv2; maybe our parser will still decode it, but I'd be surprised if it worked. |
I wonder if we'll need a slightly more robust version matcher, using a And then we'll probably need a way to switch between comparing the version the client advertises versus the version that is actually negotiated. (Or maybe the latter isn't actually useful, I dunno.) |
Sounds like a great idea. Different APIs sometimes using subtly different naming schemes is can already be a source of confusion and removing that source of potential misconfiguration seems nice. |