MCPcopy Create free account
hub / github.com/chronoxor/CppServer / CreateContext

Method CreateContext

tests/test_ssl.cpp:47–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 using SSLClient::SSLClient;
46
47 static std::shared_ptr<SSLContext> CreateContext()
48 {
49 auto context = std::make_shared<SSLContext>(asio::ssl::context::tlsv13);
50 context->set_default_verify_paths();
51 context->set_root_certs();
52 context->set_verify_mode(asio::ssl::verify_peer | asio::ssl::verify_fail_if_no_peer_cert);
53 context->load_verify_file("../tools/certificates/ca.pem");
54 return context;
55 }
56
57protected:
58 void onConnected() override { connected = true; }

Callers

nothing calls this directly

Calls 1

set_root_certsMethod · 0.80

Tested by

no test coverage detected