4#ifndef _Stroika_Foundation_Cryptography_OpenSSL_ServerContext_h_
5#define _Stroika_Foundation_Cryptography_OpenSSL_ServerContext_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
11#if qStroika_HasComponent_OpenSSL
12#include <openssl/ssl.h>
15#include "Stroika/Foundation/Common/Common.h"
16#include "Stroika/Foundation/Cryptography/SSL/ServerContext.h"
18namespace Stroika::Foundation::Cryptography::Providers::OpenSSL::ServerContext {
20#if qStroika_HasComponent_OpenSSL
24 struct LibRepType : unique_ptr<::SSL_CTX, decltype (&::SSL_CTX_free)> {
25 using inherited = unique_ptr<::SSL_CTX,
decltype (&::SSL_CTX_free)>;
27 LibRepType (nullptr_t);
28 LibRepType (LibRepType&&) =
default;
29 LibRepType (SSL_CTX* p);
34 struct IRep : Cryptography::SSL::ServerContext::IRep {
35 virtual SSL_CTX* Get_SSL_CTX ()
const = 0;
40 struct Ptr : shared_ptr<IRep> {
41 using inherited = shared_ptr<IRep>;
47 using inherited::inherited;
48 Ptr (
const shared_ptr<IRep>& p);
49 Ptr (
const shared_ptr<SSL::ServerContext::IRep>& p);
52 struct Options : SSL::ServerContext::Options {
53 const SSL_METHOD* fMethod{::TLS_server_method ()};
58 Ptr New (
const Options& o);
68#include "ServerContext.inl"