Realistic 3D camera system
3D camera system components
Classes | Public Types | Public Member Functions | List of all members
asio::ssl::context Class Reference

#include <context.hpp>

Inheritance diagram for asio::ssl::context:
asio::ssl::context_base asio::detail::noncopyable

Classes

struct  bio_cleanup
 
struct  dh_cleanup
 
struct  evp_pkey_cleanup
 
struct  rsa_cleanup
 
struct  x509_cleanup
 

Public Types

typedef SSL_CTX * native_handle_type
 The native handle type of the SSL context. More...
 
typedef SSL_CTX * impl_type
 (Deprecated: Use native_handle_type.) The native type of the SSL context. More...
 
- Public Types inherited from asio::ssl::context_base
enum  method {
  sslv2, sslv2_client, sslv2_server, sslv3,
  sslv3_client, sslv3_server, tlsv1, tlsv1_client,
  tlsv1_server, sslv23, sslv23_client, sslv23_server,
  tlsv11, tlsv11_client, tlsv11_server, tlsv12,
  tlsv12_client, tlsv12_server
}
 Different methods supported by a context. More...
 
enum  file_format { asn1, pem }
 File format types. More...
 
enum  password_purpose { for_reading, for_writing }
 Purpose of PEM password. More...
 
typedef long options
 Bitmask type for SSL options. More...
 
typedef int verify_mode
 

Public Member Functions

ASIO_DECL context (method m)
 Constructor. More...
 
ASIO_DECL context (asio::io_service &, method m)
 Deprecated constructor taking a reference to an io_service object. More...
 
ASIO_DECL ~context ()
 Destructor. More...
 
ASIO_DECL native_handle_type native_handle ()
 Get the underlying implementation in the native type. More...
 
ASIO_DECL impl_type impl ()
 
ASIO_DECL void clear_options (options o)
 Clear options on the context. More...
 
ASIO_DECL asio::error_code clear_options (options o, asio::error_code &ec)
 Clear options on the context. More...
 
ASIO_DECL void set_options (options o)
 Set options on the context. More...
 
ASIO_DECL asio::error_code set_options (options o, asio::error_code &ec)
 Set options on the context. More...
 
ASIO_DECL void set_verify_mode (verify_mode v)
 Set the peer verification mode. More...
 
ASIO_DECL asio::error_code set_verify_mode (verify_mode v, asio::error_code &ec)
 Set the peer verification mode. More...
 
ASIO_DECL void set_verify_depth (int depth)
 Set the peer verification depth. More...
 
ASIO_DECL asio::error_code set_verify_depth (int depth, asio::error_code &ec)
 Set the peer verification depth. More...
 
template<typename VerifyCallback >
void set_verify_callback (VerifyCallback callback)
 Set the callback used to verify peer certificates. More...
 
template<typename VerifyCallback >
asio::error_code set_verify_callback (VerifyCallback callback, asio::error_code &ec)
 Set the callback used to verify peer certificates. More...
 
ASIO_DECL void load_verify_file (const std::string &filename)
 Load a certification authority file for performing verification. More...
 
ASIO_DECL asio::error_code load_verify_file (const std::string &filename, asio::error_code &ec)
 Load a certification authority file for performing verification. More...
 
ASIO_DECL void add_certificate_authority (const const_buffer &ca)
 Add certification authority for performing verification. More...
 
ASIO_DECL asio::error_code add_certificate_authority (const const_buffer &ca, asio::error_code &ec)
 Add certification authority for performing verification. More...
 
ASIO_DECL void set_default_verify_paths ()
 
ASIO_DECL asio::error_code set_default_verify_paths (asio::error_code &ec)
 
ASIO_DECL void add_verify_path (const std::string &path)
 
ASIO_DECL asio::error_code add_verify_path (const std::string &path, asio::error_code &ec)
 
ASIO_DECL void use_certificate (const const_buffer &certificate, file_format format)
 Use a certificate from a memory buffer. More...
 
ASIO_DECL asio::error_code use_certificate (const const_buffer &certificate, file_format format, asio::error_code &ec)
 Use a certificate from a memory buffer. More...
 
ASIO_DECL void use_certificate_file (const std::string &filename, file_format format)
 Use a certificate from a file. More...
 
ASIO_DECL asio::error_code use_certificate_file (const std::string &filename, file_format format, asio::error_code &ec)
 Use a certificate from a file. More...
 
ASIO_DECL void use_certificate_chain (const const_buffer &chain)
 Use a certificate chain from a memory buffer. More...
 
ASIO_DECL asio::error_code use_certificate_chain (const const_buffer &chain, asio::error_code &ec)
 Use a certificate chain from a memory buffer. More...
 
ASIO_DECL void use_certificate_chain_file (const std::string &filename)
 Use a certificate chain from a file. More...
 
ASIO_DECL asio::error_code use_certificate_chain_file (const std::string &filename, asio::error_code &ec)
 Use a certificate chain from a file. More...
 
ASIO_DECL void use_private_key (const const_buffer &private_key, file_format format)
 Use a private key from a memory buffer. More...
 
ASIO_DECL asio::error_code use_private_key (const const_buffer &private_key, file_format format, asio::error_code &ec)
 Use a private key from a memory buffer. More...
 
ASIO_DECL void use_private_key_file (const std::string &filename, file_format format)
 Use a private key from a file. More...
 
ASIO_DECL asio::error_code use_private_key_file (const std::string &filename, file_format format, asio::error_code &ec)
 Use a private key from a file. More...
 
ASIO_DECL void use_rsa_private_key (const const_buffer &private_key, file_format format)
 Use an RSA private key from a memory buffer. More...
 
ASIO_DECL asio::error_code use_rsa_private_key (const const_buffer &private_key, file_format format, asio::error_code &ec)
 Use an RSA private key from a memory buffer. More...
 
ASIO_DECL void use_rsa_private_key_file (const std::string &filename, file_format format)
 Use an RSA private key from a file. More...
 
ASIO_DECL asio::error_code use_rsa_private_key_file (const std::string &filename, file_format format, asio::error_code &ec)
 Use an RSA private key from a file. More...
 
ASIO_DECL void use_tmp_dh (const const_buffer &dh)
 
ASIO_DECL asio::error_code use_tmp_dh (const const_buffer &dh, asio::error_code &ec)
 
ASIO_DECL void use_tmp_dh_file (const std::string &filename)
 Use the specified file to obtain the temporary Diffie-Hellman parameters. More...
 
ASIO_DECL asio::error_code use_tmp_dh_file (const std::string &filename, asio::error_code &ec)
 Use the specified file to obtain the temporary Diffie-Hellman parameters. More...
 
template<typename PasswordCallback >
void set_password_callback (PasswordCallback callback)
 Set the password callback. More...
 
template<typename PasswordCallback >
asio::error_code set_password_callback (PasswordCallback callback, asio::error_code &ec)
 Set the password callback. More...
 
- Public Member Functions inherited from asio::ssl::context_base
 ASIO_STATIC_CONSTANT (long, default_workarounds=SSL_OP_ALL)
 
 ASIO_STATIC_CONSTANT (long, single_dh_use=SSL_OP_SINGLE_DH_USE)
 
 ASIO_STATIC_CONSTANT (long, no_sslv2=SSL_OP_NO_SSLv2)
 
 ASIO_STATIC_CONSTANT (long, no_sslv3=SSL_OP_NO_SSLv3)
 
 ASIO_STATIC_CONSTANT (long, no_tlsv1=SSL_OP_NO_TLSv1)
 
 ASIO_STATIC_CONSTANT (long, no_tlsv1_1=0x10000000L)
 
 ASIO_STATIC_CONSTANT (long, no_tlsv1_2=0x08000000L)
 
 ASIO_STATIC_CONSTANT (long, no_compression=0x20000L)
 
 ASIO_STATIC_CONSTANT (int, verify_none=SSL_VERIFY_NONE)
 
 ASIO_STATIC_CONSTANT (int, verify_peer=SSL_VERIFY_PEER)
 
 ASIO_STATIC_CONSTANT (int, verify_fail_if_no_peer_cert=SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
 
 ASIO_STATIC_CONSTANT (int, verify_client_once=SSL_VERIFY_CLIENT_ONCE)
 

Additional Inherited Members

- Protected Member Functions inherited from asio::ssl::context_base
 ~context_base ()
 Protected destructor to prevent deletion through this type. More...
 

Detailed Description

Definition at line 47 of file context.hpp.

Member Typedef Documentation

(Deprecated: Use native_handle_type.) The native type of the SSL context.

Definition at line 56 of file context.hpp.

The native handle type of the SSL context.

Definition at line 53 of file context.hpp.

Constructor & Destructor Documentation

asio::ssl::context::context ( context::method  m)
explicit

Constructor.

Definition at line 66 of file context.ipp.

asio::ssl::context::context ( asio::io_service ,
context::method  m 
)

Deprecated constructor taking a reference to an io_service object.

Definition at line 170 of file context.ipp.

asio::ssl::context::~context ( )

Destructor.

Definition at line 194 of file context.ipp.

Member Function Documentation

void asio::ssl::context::add_certificate_authority ( const const_buffer ca)

Add certification authority for performing verification.

This function is used to add one trusted certification authority from a memory buffer.

Parameters
caThe buffer containing the certification authority certificate. The certificate must use the PEM format.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_get_cert_store and X509_STORE_add_cert.

Definition at line 347 of file context.ipp.

asio::error_code asio::ssl::context::add_certificate_authority ( const const_buffer ca,
asio::error_code ec 
)

Add certification authority for performing verification.

This function is used to add one trusted certification authority from a memory buffer.

Parameters
caThe buffer containing the certification authority certificate. The certificate must use the PEM format.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_get_cert_store and X509_STORE_add_cert.

Definition at line 354 of file context.ipp.

void asio::ssl::context::add_verify_path ( const std::string &  path)

Add a directory containing certificate authority files to be used for performing verification. This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".

Parameters
pathThe name of a directory containing the certificates.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_load_verify_locations.

Definition at line 406 of file context.ipp.

asio::error_code asio::ssl::context::add_verify_path ( const std::string &  path,
asio::error_code ec 
)

Add a directory containing certificate authority files to be used for performing verification. This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".

Parameters
pathThe name of a directory containing the certificates.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_load_verify_locations.

Definition at line 413 of file context.ipp.

void asio::ssl::context::clear_options ( context::options  o)

Clear options on the context.

This function may be used to configure the SSL options used by the context.

Parameters
oA bitmask of options. The available option values are defined in the context_base class. The specified options, if currently enabled on the context, are cleared.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_clear_options.

Definition at line 230 of file context.ipp.

asio::error_code asio::ssl::context::clear_options ( context::options  o,
asio::error_code ec 
)

Clear options on the context.

This function may be used to configure the SSL options used by the context.

Parameters
oA bitmask of options. The available option values are defined in the context_base class. The specified options, if currently enabled on the context, are cleared.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_clear_options.

Definition at line 237 of file context.ipp.

context::impl_type asio::ssl::context::impl ( )

(Deprecated: Use native_handle().) Get the underlying implementation in the native type. This function may be used to obtain the underlying implementation of the context. This is intended to allow access to context functionality that is not otherwise provided.

Definition at line 225 of file context.ipp.

void asio::ssl::context::load_verify_file ( const std::string &  filename)

Load a certification authority file for performing verification.

This function is used to load one or more trusted certification authorities from a file.

Parameters
filenameThe name of a file containing certification authority certificates in PEM format.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_load_verify_locations.

Definition at line 323 of file context.ipp.

asio::error_code asio::ssl::context::load_verify_file ( const std::string &  filename,
asio::error_code ec 
)

Load a certification authority file for performing verification.

This function is used to load the certificates for one or more trusted certification authorities from a file.

Parameters
filenameThe name of a file containing certification authority certificates in PEM format.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_load_verify_locations.

Definition at line 330 of file context.ipp.

context::native_handle_type asio::ssl::context::native_handle ( )

Get the underlying implementation in the native type.

This function may be used to obtain the underlying implementation of the context. This is intended to allow access to context functionality that is not otherwise provided.

Definition at line 220 of file context.ipp.

void asio::ssl::context::set_default_verify_paths ( )

Configures the context to use the default directories for finding certification authority certificates. This function specifies that the context should use the default, system-dependent directories for locating certification authority certificates.

Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_default_verify_paths.

Definition at line 382 of file context.ipp.

asio::error_code asio::ssl::context::set_default_verify_paths ( asio::error_code ec)

Configures the context to use the default directories for finding certification authority certificates. This function specifies that the context should use the default, system-dependent directories for locating certification authority certificates.

Parameters
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_default_verify_paths.

Definition at line 389 of file context.ipp.

void asio::ssl::context::set_options ( context::options  o)

Set options on the context.

This function may be used to configure the SSL options used by the context.

Parameters
oA bitmask of options. The available option values are defined in the context_base class. The options are bitwise-ored with any existing value for the options.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_options.

Definition at line 264 of file context.ipp.

asio::error_code asio::ssl::context::set_options ( context::options  o,
asio::error_code ec 
)

Set options on the context.

This function may be used to configure the SSL options used by the context.

Parameters
oA bitmask of options. The available option values are defined in the context_base class. The options are bitwise-ored with any existing value for the options.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_options.

Definition at line 271 of file context.ipp.

template<typename PasswordCallback >
void asio::ssl::context::set_password_callback ( PasswordCallback  callback)

Set the password callback.

This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.

Parameters
callbackThe function object to be used for obtaining the password. The function signature of the handler must be:
std::string password_callback(
std::size_t max_length, // The maximum size for a password.
password_purpose purpose // Whether password is for reading or writing.
);
The return value of the callback is a string containing the password.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_default_passwd_cb.

Definition at line 49 of file context.hpp.

template<typename PasswordCallback >
asio::error_code asio::ssl::context::set_password_callback ( PasswordCallback  callback,
asio::error_code ec 
)

Set the password callback.

This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.

Parameters
callbackThe function object to be used for obtaining the password. The function signature of the handler must be:
std::string password_callback(
std::size_t max_length, // The maximum size for a password.
password_purpose purpose // Whether password is for reading or writing.
);
The return value of the callback is a string containing the password.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_default_passwd_cb.

Definition at line 57 of file context.hpp.

template<typename VerifyCallback >
void asio::ssl::context::set_verify_callback ( VerifyCallback  callback)

Set the callback used to verify peer certificates.

This function is used to specify a callback function that will be called by the implementation when it needs to verify a peer certificate.

Parameters
callbackThe function object to be used for verifying a certificate. The function signature of the handler must be:
bool preverified, // True if the certificate passed pre-verification.
verify_context& ctx // The peer certificate and other context.
);
The return value of the callback is true if the certificate has passed verification, false otherwise.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_verify.

Definition at line 33 of file context.hpp.

template<typename VerifyCallback >
asio::error_code asio::ssl::context::set_verify_callback ( VerifyCallback  callback,
asio::error_code ec 
)

Set the callback used to verify peer certificates.

This function is used to specify a callback function that will be called by the implementation when it needs to verify a peer certificate.

Parameters
callbackThe function object to be used for verifying a certificate. The function signature of the handler must be:
bool preverified, // True if the certificate passed pre-verification.
verify_context& ctx // The peer certificate and other context.
);
The return value of the callback is true if the certificate has passed verification, false otherwise.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_verify.

Definition at line 41 of file context.hpp.

void asio::ssl::context::set_verify_depth ( int  depth)

Set the peer verification depth.

This function may be used to configure the maximum verification depth allowed by the context.

Parameters
depthMaximum depth for the certificate chain verification that shall be allowed.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_verify_depth.

Definition at line 307 of file context.ipp.

asio::error_code asio::ssl::context::set_verify_depth ( int  depth,
asio::error_code ec 
)

Set the peer verification depth.

This function may be used to configure the maximum verification depth allowed by the context.

Parameters
depthMaximum depth for the certificate chain verification that shall be allowed.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_verify_depth.

Definition at line 314 of file context.ipp.

void asio::ssl::context::set_verify_mode ( verify_mode  v)

Set the peer verification mode.

This function may be used to configure the peer verification mode used by the context.

Parameters
vA bitmask of peer verification modes. See verify_mode for available values.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_verify.

Definition at line 291 of file context.ipp.

asio::error_code asio::ssl::context::set_verify_mode ( verify_mode  v,
asio::error_code ec 
)

Set the peer verification mode.

This function may be used to configure the peer verification mode used by the context.

Parameters
vA bitmask of peer verification modes. See verify_mode for available values.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_verify.

Definition at line 298 of file context.ipp.

void asio::ssl::context::use_certificate ( const const_buffer certificate,
file_format  format 
)

Use a certificate from a memory buffer.

This function is used to load a certificate into the context from a buffer.

Parameters
certificateThe buffer containing the certificate.
formatThe certificate format (ASN.1 or PEM).
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_certificate or SSL_CTX_use_certificate_ASN1.

Definition at line 430 of file context.ipp.

asio::error_code asio::ssl::context::use_certificate ( const const_buffer certificate,
file_format  format,
asio::error_code ec 
)

Use a certificate from a memory buffer.

This function is used to load a certificate into the context from a buffer.

Parameters
certificateThe buffer containing the certificate.
formatThe certificate format (ASN.1 or PEM).
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_certificate or SSL_CTX_use_certificate_ASN1.

Definition at line 438 of file context.ipp.

void asio::ssl::context::use_certificate_chain ( const const_buffer chain)

Use a certificate chain from a memory buffer.

This function is used to load a certificate chain into the context from a buffer.

Parameters
chainThe buffer containing the certificate chain. The certificate chain must use the PEM format.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_certificate and SSL_CTX_add_extra_chain_cert.

Definition at line 524 of file context.ipp.

asio::error_code asio::ssl::context::use_certificate_chain ( const const_buffer chain,
asio::error_code ec 
)

Use a certificate chain from a memory buffer.

This function is used to load a certificate chain into the context from a buffer.

Parameters
chainThe buffer containing the certificate chain. The certificate chain must use the PEM format.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_certificate and SSL_CTX_add_extra_chain_cert.

Definition at line 531 of file context.ipp.

void asio::ssl::context::use_certificate_chain_file ( const std::string &  filename)

Use a certificate chain from a file.

This function is used to load a certificate chain into the context from a file.

Parameters
filenameThe name of the file containing the certificate. The file must use the PEM format.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_certificate_chain_file.

Definition at line 594 of file context.ipp.

asio::error_code asio::ssl::context::use_certificate_chain_file ( const std::string &  filename,
asio::error_code ec 
)

Use a certificate chain from a file.

This function is used to load a certificate chain into the context from a file.

Parameters
filenameThe name of the file containing the certificate. The file must use the PEM format.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_certificate_chain_file.

Definition at line 601 of file context.ipp.

void asio::ssl::context::use_certificate_file ( const std::string &  filename,
file_format  format 
)

Use a certificate from a file.

This function is used to load a certificate into the context from a file.

Parameters
filenameThe name of the file containing the certificate.
formatThe file format (ASN.1 or PEM).
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_certificate_file.

Definition at line 482 of file context.ipp.

asio::error_code asio::ssl::context::use_certificate_file ( const std::string &  filename,
file_format  format,
asio::error_code ec 
)

Use a certificate from a file.

This function is used to load a certificate into the context from a file.

Parameters
filenameThe name of the file containing the certificate.
formatThe file format (ASN.1 or PEM).
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_certificate_file.

Definition at line 490 of file context.ipp.

void asio::ssl::context::use_private_key ( const const_buffer private_key,
context::file_format  format 
)

Use a private key from a memory buffer.

This function is used to load a private key into the context from a buffer.

Parameters
private_keyThe buffer containing the private key.
formatThe private key format (ASN.1 or PEM).
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_PrivateKey or SSL_CTX_use_PrivateKey_ASN1.

Definition at line 618 of file context.ipp.

asio::error_code asio::ssl::context::use_private_key ( const const_buffer private_key,
context::file_format  format,
asio::error_code ec 
)

Use a private key from a memory buffer.

This function is used to load a private key into the context from a buffer.

Parameters
private_keyThe buffer containing the private key.
formatThe private key format (ASN.1 or PEM).
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_PrivateKey or SSL_CTX_use_PrivateKey_ASN1.

Definition at line 626 of file context.ipp.

void asio::ssl::context::use_private_key_file ( const std::string &  filename,
context::file_format  format 
)

Use a private key from a file.

This function is used to load a private key into the context from a file.

Parameters
filenameThe name of the file containing the private key.
formatThe file format (ASN.1 or PEM).
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_PrivateKey_file.

Definition at line 669 of file context.ipp.

asio::error_code asio::ssl::context::use_private_key_file ( const std::string &  filename,
context::file_format  format,
asio::error_code ec 
)

Use a private key from a file.

This function is used to load a private key into the context from a file.

Parameters
filenameThe name of the file containing the private key.
formatThe file format (ASN.1 or PEM).
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_PrivateKey_file.

Definition at line 728 of file context.ipp.

void asio::ssl::context::use_rsa_private_key ( const const_buffer private_key,
context::file_format  format 
)

Use an RSA private key from a memory buffer.

This function is used to load an RSA private key into the context from a buffer.

Parameters
private_keyThe buffer containing the RSA private key.
formatThe private key format (ASN.1 or PEM).
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_RSAPrivateKey or SSL_CTX_use_RSAPrivateKey_ASN1.

Definition at line 677 of file context.ipp.

asio::error_code asio::ssl::context::use_rsa_private_key ( const const_buffer private_key,
context::file_format  format,
asio::error_code ec 
)

Use an RSA private key from a memory buffer.

This function is used to load an RSA private key into the context from a buffer.

Parameters
private_keyThe buffer containing the RSA private key.
formatThe private key format (ASN.1 or PEM).
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_RSAPrivateKey or SSL_CTX_use_RSAPrivateKey_ASN1.

Definition at line 685 of file context.ipp.

void asio::ssl::context::use_rsa_private_key_file ( const std::string &  filename,
context::file_format  format 
)

Use an RSA private key from a file.

This function is used to load an RSA private key into the context from a file.

Parameters
filenameThe name of the file containing the RSA private key.
formatThe file format (ASN.1 or PEM).
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_use_RSAPrivateKey_file.

Definition at line 762 of file context.ipp.

asio::error_code asio::ssl::context::use_rsa_private_key_file ( const std::string &  filename,
context::file_format  format,
asio::error_code ec 
)

Use an RSA private key from a file.

This function is used to load an RSA private key into the context from a file.

Parameters
filenameThe name of the file containing the RSA private key.
formatThe file format (ASN.1 or PEM).
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_use_RSAPrivateKey_file.

Definition at line 770 of file context.ipp.

void asio::ssl::context::use_tmp_dh ( const const_buffer dh)

Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters. This function is used to load Diffie-Hellman parameters into the context from a buffer.

Parameters
dhThe memory buffer containing the Diffie-Hellman parameters. The buffer must use the PEM format.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_tmp_dh.

Definition at line 805 of file context.ipp.

asio::error_code asio::ssl::context::use_tmp_dh ( const const_buffer dh,
asio::error_code ec 
)

Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters. This function is used to load Diffie-Hellman parameters into the context from a buffer.

Parameters
dhThe memory buffer containing the Diffie-Hellman parameters. The buffer must use the PEM format.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_tmp_dh.

Definition at line 812 of file context.ipp.

void asio::ssl::context::use_tmp_dh_file ( const std::string &  filename)

Use the specified file to obtain the temporary Diffie-Hellman parameters.

This function is used to load Diffie-Hellman parameters into the context from a file.

Parameters
filenameThe name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.
Exceptions
asio::system_errorThrown on failure.
Note
Calls SSL_CTX_set_tmp_dh.

Definition at line 829 of file context.ipp.

asio::error_code asio::ssl::context::use_tmp_dh_file ( const std::string &  filename,
asio::error_code ec 
)

Use the specified file to obtain the temporary Diffie-Hellman parameters.

This function is used to load Diffie-Hellman parameters into the context from a file.

Parameters
filenameThe name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.
ecSet to indicate what error occurred, if any.
Note
Calls SSL_CTX_set_tmp_dh.

Definition at line 836 of file context.ipp.


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