Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
ServerContext.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
5namespace Stroika::Foundation::Cryptography::Providers::OpenSSL::ServerContext {
6
7#if qStroika_HasComponent_OpenSSL
8 /*
9 ********************************************************************************
10 ******************* OpenSSL::ServerContext::LibRepType *************************
11 ********************************************************************************
12 */
13 inline LibRepType::LibRepType (nullptr_t)
14 : inherited{nullptr, SSL_CTX_free}
15 {
16 }
17 inline LibRepType::LibRepType (SSL_CTX* p)
18 : inherited{p, &::SSL_CTX_free}
19 {
20 }
21
22 /*
23 ********************************************************************************
24 ************************* OpenSSL::ServerContext::Ptr **************************
25 ********************************************************************************
26 */
27 inline Ptr::Ptr (const shared_ptr<IRep>& p)
28 : inherited{p}
29 {
30 }
31 inline Ptr::Ptr (const shared_ptr<SSL::ServerContext::IRep>& p)
32 {
33 if (auto pp = dynamic_pointer_cast<IRep> (p)) [[likely]] {
34 *this = Ptr{pp};
35 }
36 else {
37 Execution::Throw (bad_cast{});
38 }
39 }
40#endif
41
42}