26#ifndef MYSQL_HARNESS_TLS_CONTEXT_INCLUDED
27#define MYSQL_HARNESS_TLS_CONTEXT_INCLUDED
33#include <system_error>
43#include <openssl/ssl.h>
95 return OPENSSL_VERSION_NUMBER >= 0x1000200f;
106 return OPENSSL_VERSION_NUMBER >= 0x1010100f;
112 explicit TlsContext(
const SSL_METHOD *method);
133 const std::string &ca_path);
154 const std::string &crl_path);
159 SSL_CTX *
get()
const {
return ssl_ctx_.get(); }
189 std::vector<std::string> cipher_list()
const;
222 const std::string &private_key_file,
const std::string &cert_chain_file);
wraps SSL_CTX.
Definition: tls_context.h:85
static constexpr bool has_set_curves_list()
if TLS context allows to change elliptic curves list.
Definition: tls_context.h:93
SSL_CTX * get() const
get non-owning pointer to SSL_CTX.
Definition: tls_context.h:159
static constexpr bool has_set_cipher_suites()
if TLS context allows setting cipher-suites (TLSv1.3 and later).
Definition: tls_context.h:104
void(*)(const SSL *, int, int) InfoCallback
Definition: tls_context.h:191
Definition: tls_context.h:64
TlsLibraryContext(TlsLibraryContext &&)=delete
TlsLibraryContext & operator=(const TlsLibraryContext &)=delete
TlsLibraryContext & operator=(TlsLibraryContext &&)=delete
TlsLibraryContext(const TlsLibraryContext &)=delete
Definition: expected.h:286
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2440
int security_level(void)
Definition: sql_authentication.cc:1287
TlsVerify
Verification of Cerifiticates.
Definition: tls_context.h:62
TlsVersion
TLS Versions.
Definition: tls_context.h:54
#define HARNESS_TLS_EXPORT
Definition: tls_export.h:15