问题
In the example of doc/html/boost_asio/example/cpp03/ssl/client.cpp - 1.58.0, it loads a file named ca.pem
, but where can I download it? I've tried to export one from Firefox, and also tried to use the one in my system such as /usr/share/ca-certificates/mozilla/GeoTrust_Global_CA.crt
, but the example program only returns message
Verifying /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
Handshake failed: certificate verify failed
Any suggestion? Thanks a lot.
回答1:
You can use Mozilla certificate pack converted to PEM format by the authors of cURL library. You can download it from cURL site.
I tried to run this boost.asio example using this pack and it ran successfully.
回答2:
It's in the library source tree:
libs/asio/example/cpp03/ssl/server.pem
libs/asio/example/cpp03/ssl/dh512.pem
libs/asio/example/cpp03/ssl/ca.pem
来源:https://stackoverflow.com/questions/31197069/where-can-i-download-a-ca-pem-file-for-boostasiossl