| 25 | { |
| 26 | public: |
| 27 | client(boost::asio::io_context& io_context, |
| 28 | boost::asio::ssl::context& context, |
| 29 | const tcp::resolver::results_type& endpoints) |
| 30 | : socket_(io_context, context) |
| 31 | { |
| 32 | socket_.set_verify_mode(boost::asio::ssl::verify_peer); |
| 33 | socket_.set_verify_callback( |
| 34 | std::bind(&client::verify_certificate, this, _1, _2)); |
| 35 | |
| 36 | connect(endpoints); |
| 37 | } |
| 38 | |
| 39 | private: |
| 40 | bool verify_certificate(bool preverified, |
nothing calls this directly
no test coverage detected