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

2019-08-12 03:54发布

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.

2条回答
兄弟一词,经得起流年.
2楼-- · 2019-08-12 04:31

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.

查看更多
Lonely孤独者°
3楼-- · 2019-08-12 04:31

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
查看更多
登录 后发表回答