25#ifndef MYSQL_HARNESS_TLS_CONTEXT_INCLUDED
26#define MYSQL_HARNESS_TLS_CONTEXT_INCLUDED
32#include <system_error>
42#include <openssl/ssl.h>
94 return OPENSSL_VERSION_NUMBER >= 0x1000200f;
105 return OPENSSL_VERSION_NUMBER >= 0x1010100f;
116 return OPENSSL_VERSION_NUMBER >= 0x1010000f;
122 explicit TlsContext(
const SSL_METHOD *method);
143 const std::string &ca_path);
164 const std::string &crl_path);
169 SSL_CTX *
get()
const {
return ssl_ctx_.get(); }
202 std::vector<std::string> cipher_list()
const;
wraps SSL_CTX.
Definition: tls_context.h:84
static constexpr bool has_set_curves_list()
if TLS context allows to change elliptic curves list.
Definition: tls_context.h:92
SSL_CTX * get() const
get non-owning pointer to SSL_CTX.
Definition: tls_context.h:169
static constexpr bool has_set_cipher_suites()
if TLS context allows setting cipher-suites (TLSv1.3 and later).
Definition: tls_context.h:103
void(*)(const SSL *, int, int) InfoCallback
Definition: tls_context.h:204
static constexpr bool has_get_cipher_list()
if TLS context allows getting cipher-lists.
Definition: tls_context.h:114
Definition: tls_context.h:63
TlsLibraryContext(TlsLibraryContext &&)=delete
TlsLibraryContext & operator=(const TlsLibraryContext &)=delete
TlsLibraryContext & operator=(TlsLibraryContext &&)=delete
TlsLibraryContext(const TlsLibraryContext &)=delete
Definition: expected.h:943
int security_level(void)
Definition: mysql_ssl_rsa_setup.cc:159
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:2436
TlsVerify
Verification of Cerifiticates.
Definition: tls_context.h:61
TlsVersion
TLS Versions.
Definition: tls_context.h:53
#define HARNESS_TLS_EXPORT
Definition: tls_export.h:15