-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Let the WiFiClientSecure set an hostname different from the ip address #7459
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
Comments
Generally speaking, there is some room for refactoring of ssl_client and WiFiClientSecure. When you look at WiFiClientSecure, you'll see that it simply converts IPAddress to string, passing it to the start_ssl_client function. Mentioned bug from additonal context has been fixed by #7351 , it will skip host translation logic when it's an IP address, but still some operations are not necessary (redundant string conversions and calls).
Why start_ssl_client uses const char* hostname? I suspect that the idea was to have a proper hostname for certificate validation (parameter of mbedtls_ssl_set_hostname). The solution is simple - introduce another optional (NULL by default) sslHostname parameter and replace current hostname parameter with IPAddress. You'll then have to translate hostname on your own, but it's not a big deal. It should be done also in WiFiClientSecure. |
I've issued PR that aims to resolve this issue.
|
Hello, Due to the overwhelming volume of issues currently being addressed, we have decided to close the previously received tickets. If you still require assistance or if the issue persists, please don't hesitate to reopen the ticket. Thanks. |
Related area
WiFiClientSecure
Hardware specification
Any
Is your feature request related to a problem?
The function
uses
host
to resolve the ip and use the it as expected CN. In some cases the CN information is provided by other meansDescribe the solution you'd like
Provide a mean to set the CN when it is different.
Describe alternatives you've considered
No response
Additional context
#7350 is tangentially related.
I have checked existing list of Feature requests and the Contribution Guide
The text was updated successfully, but these errors were encountered: