-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Should use Host header to check server_hostname when using SSLContext #3455
Comments
I'm wondering what is the use case? |
For such situations, the case is just to encrypt connection. But in this case you also want to turnoff verification since it's based on hostname. |
Certificate verification is tightly coupled with hostnames, isn't it? |
Yes, it is. And that's leaves only one use case: just to encrypt data between peers. That's was always the case for self-signed certs.
Well, user have to explicitly turn off certificate verification with all the consequences. I think it should be already possible, right? |
In fact, I want to check that a server is well configured (including https certificate) even if the dns is not set to that particular IP. The use case is to check a server is well configured before configuring the dns to target that server. |
HTTP doesn't work this way. BTW, by standard HTTP cookies also behaves differently if a site is accessed by IP. DNS hostname is too important. |
As a workaround, you can provide a custom resolver (implement |
Long story short
When I use both an IP in the URL, a Host header, and a SSLContext that is configured to check the hostname, it checks the hostname using the IP
Expected behaviour
Checks the certificate using the hostname in the Host header, if it exists
Actual behaviour
Checks the certificate using the hostname in the URL that is actually the IP and fails with the following exception :
Steps to reproduce
Your environment
The text was updated successfully, but these errors were encountered: