diff options
author | eidheim <eidheim@gmail.com> | 2014-10-17 14:55:36 +0400 |
---|---|---|
committer | eidheim <eidheim@gmail.com> | 2014-10-17 14:55:36 +0400 |
commit | 38ea8ec60fe40c112c46b350244261fffc4e1778 (patch) | |
tree | fc65474bbc8ed17a7064332857af6c1d2b329934 /client_wss.hpp | |
parent | 9f3ea2d975d988a363c67a1fc5b8fdfa478d8e7e (diff) |
Added possibility to use client certificate
Diffstat (limited to 'client_wss.hpp')
-rw-r--r-- | client_wss.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client_wss.hpp b/client_wss.hpp index 1ce58ad..53f0a83 100644 --- a/client_wss.hpp +++ b/client_wss.hpp @@ -17,6 +17,12 @@ namespace SimpleWeb { else asio_context.set_verify_mode(boost::asio::ssl::verify_none); }; + + SocketClient(const std::string& server_port_path, const std::string& verify_file) : SocketClientBase<WSS>::SocketClientBase(server_port_path, 443), + asio_context(boost::asio::ssl::context::sslv23) { + asio_context.set_verify_mode(boost::asio::ssl::verify_peer); + asio_context.load_verify_file(verify_file); + }; private: boost::asio::ssl::context asio_context; |