Realistic 3D camera system
3D camera system components
|
SSL context. More...
#include <basic_context.hpp>
Public Types | |
typedef Service | service_type |
The type of the service that will be used to provide context operations. More... | |
typedef service_type::impl_type | impl_type |
The native implementation 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 | |
basic_context (asio::io_service &io_service, method m) | |
Constructor. More... | |
~basic_context () | |
Destructor. More... | |
impl_type | impl () |
Get the underlying implementation in the native type. More... | |
void | set_options (options o) |
Set options on the context. More... | |
asio::error_code | set_options (options o, asio::error_code &ec) |
Set options on the context. More... | |
void | set_verify_mode (verify_mode v) |
Set the peer verification mode. More... | |
asio::error_code | set_verify_mode (verify_mode v, asio::error_code &ec) |
Set the peer verification mode. More... | |
void | load_verify_file (const std::string &filename) |
Load a certification authority file for performing verification. More... | |
asio::error_code | load_verify_file (const std::string &filename, asio::error_code &ec) |
Load a certification authority file for performing verification. More... | |
void | add_verify_path (const std::string &path) |
asio::error_code | add_verify_path (const std::string &path, asio::error_code &ec) |
void | use_certificate_file (const std::string &filename, file_format format) |
Use a certificate from a file. More... | |
asio::error_code | use_certificate_file (const std::string &filename, file_format format, asio::error_code &ec) |
Use a certificate from a file. More... | |
void | use_certificate_chain_file (const std::string &filename) |
Use a certificate chain from a file. More... | |
asio::error_code | use_certificate_chain_file (const std::string &filename, asio::error_code &ec) |
Use a certificate chain from a file. More... | |
void | use_private_key_file (const std::string &filename, file_format format) |
Use a private key from a file. More... | |
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... | |
void | use_rsa_private_key_file (const std::string &filename, file_format format) |
Use an RSA private key from a file. More... | |
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... | |
void | use_tmp_dh_file (const std::string &filename) |
Use the specified file to obtain the temporary Diffie-Hellman parameters. More... | |
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... | |
SSL context.
Definition at line 35 of file basic_context.hpp.
typedef service_type::impl_type asio::ssl::old::basic_context< Service >::impl_type |
The native implementation type of the SSL context.
Definition at line 44 of file basic_context.hpp.
typedef Service asio::ssl::old::basic_context< Service >::service_type |
The type of the service that will be used to provide context operations.
Definition at line 41 of file basic_context.hpp.
|
inline |
Constructor.
Definition at line 47 of file basic_context.hpp.
|
inline |
Destructor.
Definition at line 55 of file basic_context.hpp.
|
inline |
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".
path | The name of a directory containing the certificates. |
asio::system_error | Thrown on failure. |
Definition at line 182 of file basic_context.hpp.
|
inline |
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".
path | The name of a directory containing the certificates. |
ec | Set to indicate what error occurred, if any. |
Definition at line 201 of file basic_context.hpp.
|
inline |
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 66 of file basic_context.hpp.
|
inline |
Load a certification authority file for performing verification.
This function is used to load one or more trusted certification authorities from a file.
filename | The name of a file containing certification authority certificates in PEM format. |
asio::system_error | Thrown on failure. |
Definition at line 147 of file basic_context.hpp.
|
inline |
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.
filename | The name of a file containing certification authority certificates in PEM format. |
ec | Set to indicate what error occurred, if any. |
Definition at line 164 of file basic_context.hpp.
|
inline |
Set options on the context.
This function may be used to configure the SSL options used by the context.
o | A 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. |
asio::system_error | Thrown on failure. |
Definition at line 81 of file basic_context.hpp.
|
inline |
Set options on the context.
This function may be used to configure the SSL options used by the context.
o | A 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. |
ec | Set to indicate what error occurred, if any. |
Definition at line 98 of file basic_context.hpp.
|
inline |
Set the password callback.
This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
callback | The 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. ); |
asio::system_error | Thrown on failure. |
Definition at line 391 of file basic_context.hpp.
|
inline |
Set the password callback.
This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
callback | The 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. ); |
ec | Set to indicate what error occurred, if any. |
Definition at line 414 of file basic_context.hpp.
|
inline |
Set the peer verification mode.
This function may be used to configure the peer verification mode used by the context.
v | A bitmask of peer verification modes. The available verify_mode values are defined in the context_base class. |
asio::system_error | Thrown on failure. |
Definition at line 114 of file basic_context.hpp.
|
inline |
Set the peer verification mode.
This function may be used to configure the peer verification mode used by the context.
v | A bitmask of peer verification modes. The available verify_mode values are defined in the context_base class. |
ec | Set to indicate what error occurred, if any. |
Definition at line 131 of file basic_context.hpp.
|
inline |
Use a certificate chain from a file.
This function is used to load a certificate chain into the context from a file.
filename | The name of the file containing the certificate. The file must use the PEM format. |
asio::system_error | Thrown on failure. |
Definition at line 250 of file basic_context.hpp.
|
inline |
Use a certificate chain from a file.
This function is used to load a certificate chain into the context from a file.
filename | The name of the file containing the certificate. The file must use the PEM format. |
ec | Set to indicate what error occurred, if any. |
Definition at line 267 of file basic_context.hpp.
|
inline |
Use a certificate from a file.
This function is used to load a certificate into the context from a file.
filename | The name of the file containing the certificate. |
format | The file format (ASN.1 or PEM). |
asio::system_error | Thrown on failure. |
Definition at line 217 of file basic_context.hpp.
|
inline |
Use a certificate from a file.
This function is used to load a certificate into the context from a file.
filename | The name of the file containing the certificate. |
format | The file format (ASN.1 or PEM). |
ec | Set to indicate what error occurred, if any. |
Definition at line 234 of file basic_context.hpp.
|
inline |
Use a private key from a file.
This function is used to load a private key into the context from a file.
filename | The name of the file containing the private key. |
format | The file format (ASN.1 or PEM). |
asio::system_error | Thrown on failure. |
Definition at line 283 of file basic_context.hpp.
|
inline |
Use a private key from a file.
This function is used to load a private key into the context from a file.
filename | The name of the file containing the private key. |
format | The file format (ASN.1 or PEM). |
ec | Set to indicate what error occurred, if any. |
Definition at line 300 of file basic_context.hpp.
|
inline |
Use an RSA private key from a file.
This function is used to load an RSA private key into the context from a file.
filename | The name of the file containing the RSA private key. |
format | The file format (ASN.1 or PEM). |
asio::system_error | Thrown on failure. |
Definition at line 317 of file basic_context.hpp.
|
inline |
Use an RSA private key from a file.
This function is used to load an RSA private key into the context from a file.
filename | The name of the file containing the RSA private key. |
format | The file format (ASN.1 or PEM). |
ec | Set to indicate what error occurred, if any. |
Definition at line 335 of file basic_context.hpp.
|
inline |
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.
filename | The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format. |
asio::system_error | Thrown on failure. |
Definition at line 352 of file basic_context.hpp.
|
inline |
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.
filename | The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format. |
ec | Set to indicate what error occurred, if any. |
Definition at line 369 of file basic_context.hpp.