-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Fix here (but I don't know how to create a PR across repos): https://github.com/Neimhin/openssl/pull/4/files
In s_server we should switch to ctx2 when ECH is successful and when the inner SNI matches the host of the cert in ctx2. I believe the logic currently switches context whenever ECH is successful and an inner SNI is provided (regardless of whether the inner SNI matches the cert for ctx2).
This if condition in [1] is, I think, always true.
I haven't yet run any code to test this, let me know if you want me to do a demo of this bug.
The comment preceding the servername callback function says to use X509_check_host [2], which actually checks whether a hostname matches the CN of the cert (but perhaps does not verify it?). It seems to me it would be okay to not verify the hostname since the server owns the cert.
[1]
Line 682 in 6145168
| if (mrv == 1) { |
[2]
Line 522 in 6145168
| * X509_check_host is the way to do that, given an X509* pointer. |