LeviLamina
Loading...
Searching...
No Matches
SSLStreamAdapter.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/absl/AnyInvocable.h"
7#include "mc/external/rtc/SSLHandshakeError.h"
8#include "mc/external/rtc/SSLMode.h"
9#include "mc/external/rtc/SSLPeerCertificateDigestError.h"
10#include "mc/external/rtc/SSLProtocolVersion.h"
11#include "mc/external/rtc/SSLRole.h"
12#include "mc/external/rtc/StreamInterface.h"
13
14// auto generated forward declare list
15// clang-format off
16namespace rtc { class SSLCertChain; }
17namespace rtc { class SSLIdentity; }
18// clang-format on
19
20namespace rtc {
21
22class SSLStreamAdapter : public ::rtc::StreamInterface {
23public:
24 // member variables
25 // NOLINTBEGIN
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
31 SSLStreamAdapter& operator=(SSLStreamAdapter const&);
32 SSLStreamAdapter(SSLStreamAdapter const&);
33 SSLStreamAdapter();
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual ~SSLStreamAdapter() /*override*/;
39
40 virtual void SetIdentity(::std::unique_ptr<::rtc::SSLIdentity> identity) = 0;
41
42 virtual ::rtc::SSLIdentity* GetIdentityForTesting() const = 0;
43
44 virtual void SetServerRole(::rtc::SSLRole role) = 0;
45
46 virtual void SetMode(::rtc::SSLMode mode) = 0;
47
48 virtual void SetMaxProtocolVersion(::rtc::SSLProtocolVersion version) = 0;
49
50 virtual void SetInitialRetransmissionTimeout(int timeout_ms) = 0;
51
52 virtual int StartSSL() = 0;
53
54 virtual bool SetPeerCertificateDigest(
55 ::std::string_view digest_alg,
56 uchar const* digest_val,
57 uint64 digest_len,
58 ::rtc::SSLPeerCertificateDigestError* error
59 ) = 0;
60
61 virtual ::std::unique_ptr<::rtc::SSLCertChain> GetPeerSSLCertChain() const = 0;
62
63 virtual bool GetSslCipherSuite(int* cipher_suite);
64
65 virtual ::rtc::SSLProtocolVersion GetSslVersion() const = 0;
66
67 virtual bool GetSslVersionBytes(int* version) const = 0;
68
69 virtual bool ExportKeyingMaterial(
70 ::std::string_view label,
71 uchar const* context,
72 uint64 context_len,
73 bool use_context,
74 uchar* result,
75 uint64 result_len
76 );
77
78 virtual ushort GetPeerSignatureAlgorithm() const = 0;
79
80 virtual bool SetDtlsSrtpCryptoSuites(::std::vector<int> const& crypto_suites);
81
82 virtual bool GetDtlsSrtpCryptoSuite(int* crypto_suite);
83
84 virtual bool IsTlsConnected() = 0;
85 // NOLINTEND
86
87public:
88 // static functions
89 // NOLINTBEGIN
90 MCNAPI static ::std::unique_ptr<::rtc::SSLStreamAdapter> Create(
91 ::std::unique_ptr<::rtc::StreamInterface> stream,
92 ::absl::AnyInvocable<void(::rtc::SSLHandshakeError)> handshake_error
93 );
94
95 MCNAPI static ::std::string SslCipherSuiteToName(int cipher_suite);
96 // NOLINTEND
97
98public:
99 // destructor thunk
100 // NOLINTBEGIN
101 MCNAPI void $dtor();
102 // NOLINTEND
103
104public:
105 // virtual function thunks
106 // NOLINTBEGIN
107 MCNAPI bool $GetSslCipherSuite(int* cipher_suite);
108
110 ::std::string_view label,
111 uchar const* context,
112 uint64 context_len,
113 bool use_context,
114 uchar* result,
115 uint64 result_len
116 );
117
118 MCNAPI bool $SetDtlsSrtpCryptoSuites(::std::vector<int> const& crypto_suites);
119
120 MCNAPI bool $GetDtlsSrtpCryptoSuite(int* crypto_suite);
121
122
123 // NOLINTEND
124
125public:
126 // vftables
127 // NOLINTBEGIN
128 MCNAPI static void** $vftable();
129 // NOLINTEND
130};
131
132} // namespace rtc
Definition AnyInvocable.h:8
Definition SSLCertChain.h:13
Definition SSLIdentity.h:14
MCAPI bool $GetDtlsSrtpCryptoSuite(int *crypto_suite)
MCAPI bool $SetDtlsSrtpCryptoSuites(::std::vector< int > const &crypto_suites)
MCAPI bool $ExportKeyingMaterial(::std::string_view label, uchar const *context, uint64 context_len, bool use_context, uchar *result, uint64 result_len)
static MCAPI ::std::unique_ptr<::rtc::SSLStreamAdapter > Create(::std::unique_ptr<::rtc::StreamInterface > stream, ::absl::AnyInvocable< void(::rtc::SSLHandshakeError)> handshake_error)
static MCAPI void ** $vftable()
MCAPI bool $GetSslCipherSuite(int *cipher_suite)
static MCAPI ::std::string SslCipherSuiteToName(int cipher_suite)
Definition StreamInterface.h:11
Definition context.h:5
Definition Alias.h:14