Where can I download a ca.pem file for boost::asio::ssl?

╄→гoц情女王★ 提交于 2019-12-24 14:28:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!