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