Use native host check from OpenSSL #196
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This results in support for Subject Alternative Name
Bug #68052 | SSL Certificate Subject ALT Names with IPs not respected with --ssl-verify-serve
To completely fix the above but a call to
X509_check_ip
would also be needed.Note that X509_check_host(3) says:
"Applications are encouraged to use
X509_VERIFY_PARAM_set1_host()
rather than explicitly callingX509_check_host(3)
."Which is described on https://wiki.openssl.org/index.php/Hostname_validation
However to use
X509_VERIFY_PARAM_set1_host()
we need to do that just beforecreating the connection. That should be done in
ssl_do()
which is called fromsslconnect()
. But thenssl_do()
needs to know thessl_mode
andhostname
, whichit currently doesn't. Note that
ssl_verify_server_cert()
is called when theconnection is already created.