Fixes #66, added boost::asio::ssl::context::set_default_verify_paths when verify_certificate is set to true in Client<HTTPS> constructor
This commit is contained in:
parent
e18fcb4ceb
commit
ffac7545cf
1 changed files with 3 additions and 1 deletions
|
|
@ -14,8 +14,10 @@ namespace SimpleWeb {
|
|||
const std::string& cert_file=std::string(), const std::string& private_key_file=std::string(),
|
||||
const std::string& verify_file=std::string()) :
|
||||
ClientBase<HTTPS>::ClientBase(server_port_path, 443), context(boost::asio::ssl::context::tlsv12) {
|
||||
if(verify_certificate)
|
||||
if(verify_certificate) {
|
||||
context.set_verify_mode(boost::asio::ssl::verify_peer);
|
||||
context.set_default_verify_paths();
|
||||
}
|
||||
else
|
||||
context.set_verify_mode(boost::asio::ssl::verify_none);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue