MySQL 8.0.39
Source Code Documentation
DestinationTlsContext Class Reference

TlsClientContext per destination. More...

#include <destination_ssl_context.h>

Public Member Functions

void verify (SslVerify ssl_verify)
 set SslVerify. More...
 
void ca_file (const std::string &file)
 set CA file. More...
 
void ca_path (const std::string &path)
 set CA path. More...
 
void crl_file (const std::string &file)
 set CRL file. More...
 
void crl_path (const std::string &path)
 set CRL path. More...
 
void curves (const std::string &curves)
 set allowed EC curves. More...
 
void ciphers (const std::string &ciphers)
 set allowed ciphers. More...
 
TlsClientContextget (const std::string &dest_id, const std::string &hostname)
 get a TlsClientContent for a destination. More...
 

Private Attributes

SslVerify ssl_verify_ {SslVerify::kDisabled}
 
std::string ca_file_
 
std::string ca_path_
 
std::string crl_file_
 
std::string crl_path_
 
std::string curves_
 
std::string ciphers_
 
std::map< std::string, std::unique_ptr< TlsClientContext > > tls_contexts_
 
std::mutex mtx_
 

Detailed Description

TlsClientContext per destination.

Member Function Documentation

◆ ca_file()

void DestinationTlsContext::ca_file ( const std::string &  file)

set CA file.

◆ ca_path()

void DestinationTlsContext::ca_path ( const std::string &  path)

set CA path.

◆ ciphers()

void DestinationTlsContext::ciphers ( const std::string &  ciphers)

set allowed ciphers.

◆ crl_file()

void DestinationTlsContext::crl_file ( const std::string &  file)

set CRL file.

◆ crl_path()

void DestinationTlsContext::crl_path ( const std::string &  path)

set CRL path.

◆ curves()

void DestinationTlsContext::curves ( const std::string &  curves)

set allowed EC curves.

◆ get()

TlsClientContext * DestinationTlsContext::get ( const std::string &  dest_id,
const std::string &  hostname 
)

get a TlsClientContent for a destination.

If no TlsClientContext exists for the destination, creates a TlsClientContent based on:

  • verify()
  • ca_file()
  • ca_path()
  • crl_file()
  • crl_path()
  • curves()
  • ciphers()

If that succeeds, it the resulting TlsClientContext is cached and a pointer to it is returned.

If a TlsClientContext for the destination exists, a pointer to it is returned.

Parameters
dest_idunique identifier of a destination
hostnamename of the destination host

◆ verify()

void DestinationTlsContext::verify ( SslVerify  ssl_verify)

set SslVerify.

Member Data Documentation

◆ ca_file_

std::string DestinationTlsContext::ca_file_
private

◆ ca_path_

std::string DestinationTlsContext::ca_path_
private

◆ ciphers_

std::string DestinationTlsContext::ciphers_
private

◆ crl_file_

std::string DestinationTlsContext::crl_file_
private

◆ crl_path_

std::string DestinationTlsContext::crl_path_
private

◆ curves_

std::string DestinationTlsContext::curves_
private

◆ mtx_

std::mutex DestinationTlsContext::mtx_
private

◆ ssl_verify_

SslVerify DestinationTlsContext::ssl_verify_ {SslVerify::kDisabled}
private

◆ tls_contexts_

std::map<std::string, std::unique_ptr<TlsClientContext> > DestinationTlsContext::tls_contexts_
private

The documentation for this class was generated from the following files: