Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
SSL/ClientContext.h
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef _Stroika_Foundation_Cryptography_SSL_ClientContext_h_
5#define _Stroika_Foundation_Cryptography_SSL_ClientContext_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
9#include <memory>
10
11#include "Stroika/Foundation/Common/Common.h"
12#include "Stroika/Foundation/Cryptography/PKI/Certificate.h"
13#include "Stroika/Foundation/Cryptography/PKI/PrivateKey.h"
14#include "Stroika/Foundation/Cryptography/SSL/Common.h"
15
16namespace Stroika::Foundation::Cryptography::SSL::ClientContext {
17
18 /**
19 */
20 class IRep {
21 public:
22 virtual ~IRep () = default;
23 };
24
25 /**
26 */
27 struct Ptr : shared_ptr<IRep> {
28 using inherited = shared_ptr<IRep>;
29 using inherited::inherited;
30 };
31
32 struct Options {
33 /**
34 * Rarely used, but can be used if client-side certs needed
35 * \see https://en.wikipedia.org/wiki/Client_certificate
36 */
37 optional<tuple<PKI::PrivateKey::Ptr, PKI::Certificate::Ptr>> fClientCertificate;
38 };
39
40 Ptr New (const Options& options = {});
41
42}
43
44/*
45 ********************************************************************************
46 ***************************** Implementation Details ***************************
47 ********************************************************************************
48 */
49
50#endif /*_Stroika_Foundation_Cryptography_SSL_ClientContext_h_*/