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

Method CreateContext

tests/test_https.cpp:176–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 using HTTPSServer::HTTPSServer;
175
176 static std::shared_ptr<SSLContext> CreateContext()
177 {
178 auto context = std::make_shared<SSLContext>(asio::ssl::context::tlsv13);
179 context->set_password_callback([](size_t max_length, asio::ssl::context::password_purpose purpose) -> std::string { return "qwerty"; });
180 context->use_certificate_chain_file("../tools/certificates/server.pem");
181 context->use_private_key_file("../tools/certificates/server.pem", asio::ssl::context::pem);
182 context->use_tmp_dh_file("../tools/certificates/dh4096.pem");
183 return context;
184 }
185
186protected:
187 std::shared_ptr<SSLSession> CreateSession(const std::shared_ptr<SSLServer>& server) override

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected