Skip to content

Conversation

dveeden
Copy link

@dveeden dveeden commented Feb 4, 2018

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 calling X509_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 before
creating the connection. That should be done in ssl_do() which is called from
sslconnect(). But then ssl_do() needs to know the ssl_mode and hostname, which
it currently doesn't. Note that ssl_verify_server_cert() is called when the
connection is already created.

This results in support for Subject Alternative Name
https://bugs.mysql.com/bug.php?id=68052

Note that https://www.openssl.org/docs/manmaster/man3/X509_check_host.html says:
"Applications are encouraged to use X509_VERIFY_PARAM_set1_host() rather than explicitly calling X509_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 before
creating the connection. That should be done in ssl_do() which is called from
sslconnect(). But then ssl_do() needs to know the ssl_mode and hostname, which
it currently doesn't. Note that ssl_verify_server_cert() is called when the
connection is already created.
@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@dveeden
Copy link
Author

dveeden commented Feb 5, 2018

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=89578 for updates.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants