CppServer 1.0.5.0
C++ Server Library
Loading...
Searching...
No Matches
ssl_context.cpp
Go to the documentation of this file.
1
10
11#if defined(_WIN32) || defined(_WIN64)
12#include <wincrypt.h>
13#endif
14
15namespace CppServer {
16namespace Asio {
17
19{
20#if defined(_WIN32) || defined(_WIN64)
22 if (hStore == nullptr)
23 return;
24
26 PCCERT_CONTEXT pContext = nullptr;
28 {
29 // Convert from DER to internal format
30 X509* x509 = d2i_X509(nullptr, (const unsigned char**)&pContext->pbCertEncoded, pContext->cbCertEncoded);
31 if (x509 != nullptr)
32 {
35 }
36 }
37
40
41 // Attach X509_STORE to the current SSL context
43#endif
44}
45
46} // namespace Asio
47} // namespace CppServer
Asio allocate handler wrapper.
Definition memory.h:133
void set_root_certs()
Configures the context to use system root certificates.
C++ Server project definitions.
Definition asio.h:56
SSL context definition.