9 #include <aws/io/tls_channel_handler.h>
14 struct aws_tls_ctx_options;
23 class TlsContextPkcs11Options;
50 explicit operator
bool() const noexcept {
return m_isInit; }
75 const
char *cert_path,
76 const
char *pkey_path,
121 const
char *pkcs12_path,
122 const
char *pkcs12_pwd,
135 bool SetKeychainPath(
ByteCursor &keychain_path) noexcept;
149 const
char *windowsCertStorePath,
156 static
bool IsAlpnSupported() noexcept;
163 bool SetAlpnList(const
char *alpnList) noexcept;
173 void SetVerifyPeer(
bool verifyPeer) noexcept;
179 void SetMinimumTlsVersion(aws_tls_versions minimumTlsVersion);
185 void SetTlsCipherPreference(aws_tls_cipher_pref cipher_pref);
195 bool OverrideDefaultTrustStore(const
char *caPath, const
char *caFile) noexcept;
201 bool OverrideDefaultTrustStore(const
ByteCursor &ca) noexcept;
204 const aws_tls_ctx_options *GetUnderlyingHandle() const noexcept {
return &m_options; }
207 aws_tls_ctx_options m_options;
224 const std::shared_ptr<Pkcs11Lib> &pkcs11Lib,
233 void SetUserPin(
const String &pin) noexcept;
241 void SetSlotId(
const uint64_t
id) noexcept;
249 void SetTokenLabel(
const String &label) noexcept;
258 void SetPrivateKeyObjectLabel(
const String &label) noexcept;
266 void SetCertificateFilePath(
const String &path) noexcept;
274 void SetCertificateFileContents(
const String &contents) noexcept;
277 aws_tls_ctx_pkcs11_options GetUnderlyingHandle()
const noexcept;
280 std::shared_ptr<Pkcs11Lib> m_pkcs11Lib;
307 bool SetServerName(
ByteCursor &serverName) noexcept;
315 bool SetAlpnList(
const char *alpnList) noexcept;
320 explicit operator bool() const noexcept {
return isValid(); }
328 const aws_tls_connection_options *GetUnderlyingHandle() const noexcept
330 return &m_tls_connection_options;
334 bool isValid() const noexcept {
return m_isInit; }
336 TlsConnectionOptions(aws_tls_ctx *ctx,
Allocator *allocator) noexcept;
337 aws_tls_connection_options m_tls_connection_options;
338 aws_allocator *m_allocator;
369 explicit operator
bool() const noexcept {
return isValid(); }
377 aws_tls_ctx *GetUnderlyingHandle() const noexcept {
return m_ctx.get(); }
380 bool isValid() const noexcept {
return m_ctx && m_initializationError == AWS_ERROR_SUCCESS; }
382 std::shared_ptr<aws_tls_ctx> m_ctx;
383 int m_initializationError;
405 struct aws_channel_slot *slot,
406 const struct aws_tls_connection_options &options,
414 void CompleteTlsNegotiation(
int errorCode);
417 aws_tls_on_negotiation_result_fn *m_OnNegotiationResult;
420 aws_byte_buf m_protocolByteBuf;
421 friend aws_byte_buf(::aws_tls_handler_protocol)(aws_channel_handler *);
441 struct aws_channel_slot *slot,
442 const struct aws_tls_connection_options &options,
447 struct aws_channel_slot *slot,
448 const struct aws_tls_connection_options &options,