I want to check the server certificate. I have boost :: asio :: ssl :: context
This successfully validates the certificate:
context.load_verify_file("E:\\a\\windows\\Path\\to\\certificate\\9207bca9.0");
However, I do not want to explicitly specify files for certificate verification. I want to be able to put them in the same directory and tell the context to use the files in this folder for certificate verification. So I do this instead:
context.add_verify_path("E:\\a\\windows\\Path\\to\\certificate");
And the check was unsuccessful
Note. The file name 9207bca9.0: 9207bca9 is the hash of the CA certificate object, and its extension is β.0β to satisfy the requirements of the add_verify_path method found here (also the only content of this file is the root certificate. Keep in mind that I was able to verify the certificates with this file):
http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/reference/ssl__context/add_verify_path/overload1.html
Any suggestions?
source share