I am looking at the Boost SSL client . There is a link to OpenSSL in the comments (sorry, no line numbers):
// The verify callback can be used to check whether the certificate that is // being presented is valid for the peer. For example, RFC 2818 describes // the steps involved in doing this for HTTPS. Consult the OpenSSL // documentation for more details. Note that the callback is called once // for each certificate in the certificate chain, starting from the root // certificate authority.
Proper use and validation of OpenSSL can be a daunting task. From experience, I know that for the library to work properly, I must do the following:
- Disable SSLv2, SSLv3 and compression in the Context object
- Provide the correct root certificate for chaining and validation
- Call
SSL_get_peer_certificate and verify that the certificate is not NULL - Call
SSL_get_verify_result and check the result of X509_V_OK - Performing a name resolution (CN or SAN must match the requested host)
OpenSSL 1.1.0 will provide name verification, but only in HEAD at this point in time. From the OpenSSL Change Log :
Integrate hostname, email address and IP address checking with certificate verification. New verify options supporting checking in opensl utility.
and
New functions to check a hostname email or IP address against a certificate. Add options x509 utility to print results of checks against a certificate.
I do not see where Boost performs any configuration or checks in the client code.
What is the Boost setting and what does it check or verify in its component of the asio library when using SSL?
source share