11 #ifndef ASIO_SSL_CONTEXT_HPP 12 #define ASIO_SSL_CONTEXT_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_ENABLE_OLD_SSL) 23 #else // defined(ASIO_ENABLE_OLD_SSL) 33 #endif // defined(ASIO_ENABLE_OLD_SSL) 40 #if defined(ASIO_ENABLE_OLD_SSL) 43 typedef basic_context<context_service> context;
45 #else // defined(ASIO_ENABLE_OLD_SSL) 64 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 89 ASIO_DECL context& operator=(context&& other);
90 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 246 template <
typename VerifyCallback>
267 template <
typename VerifyCallback>
714 template <
typename PasswordCallback>
734 template <
typename PasswordCallback>
750 ASIO_DECL static int verify_callback_function(
751 int preverified, X509_STORE_CTX* ctx);
758 ASIO_DECL static int password_callback_function(
759 char*
buf,
int size,
int purpose,
void* data);
769 native_handle_type handle_;
775 #endif // defined(ASIO_ENABLE_OLD_SSL) 783 #if defined(ASIO_HEADER_ONLY) 785 #endif // defined(ASIO_HEADER_ONLY) 787 #endif // ASIO_SSL_CONTEXT_HPP ASIO_DECL void use_tmp_dh_file(const std::string &filename)
Use the specified file to obtain the temporary Diffie-Hellman parameters.
void set_password_callback(PasswordCallback callback)
Set the password callback.
ASIO_DECL void set_default_verify_paths()
SSL_CTX * native_handle_type
The native handle type of the SSL context.
SSL_CTX * impl_type
(Deprecated: Use native_handle_type.) The native type of the SSL context.
ASIO_DECL void clear_options(options o)
Clear options on the context.
ASIO_DECL void use_rsa_private_key_file(const std::string &filename, file_format format)
Use an RSA private key from a file.
Provides core I/O functionality.
ASIO_DECL void use_private_key(const const_buffer &private_key, file_format format)
Use a private key from a memory buffer.
Holds a buffer that cannot be modified.
ASIO_DECL void load_verify_file(const std::string &filename)
Load a certification authority file for performing verification.
ASIO_DECL void use_rsa_private_key(const const_buffer &private_key, file_format format)
Use an RSA private key from a memory buffer.
ASIO_DECL void use_certificate(const const_buffer &certificate, file_format format)
Use a certificate from a memory buffer.
asio::basic_streambuf< Allocator > & b
ASIO_DECL void use_certificate_chain_file(const std::string &filename)
Use a certificate chain from a file.
ASIO_DECL void set_verify_depth(int depth)
Set the peer verification depth.
ASIO_DECL void use_private_key_file(const std::string &filename, file_format format)
Use a private key from a file.
method
Different methods supported by a context.
ASIO_DECL context(method m)
Constructor.
ASIO_DECL void set_options(options o)
Set options on the context.
void set_verify_callback(VerifyCallback callback)
Set the callback used to verify peer certificates.
ASIO_DECL native_handle_type native_handle()
Get the underlying implementation in the native type.
ASIO_DECL void add_certificate_authority(const const_buffer &ca)
Add certification authority for performing verification.
Class to represent an error code value.
ASIO_DECL impl_type impl()
ASIO_DECL void use_certificate_file(const std::string &filename, file_format format)
Use a certificate from a file.
ASIO_DECL void set_verify_mode(verify_mode v)
Set the peer verification mode.
long options
Bitmask type for SSL options.
ASIO_DECL void use_certificate_chain(const const_buffer &chain)
Use a certificate chain from a memory buffer.
ASIO_DECL ~context()
Destructor.
file_format
File format types.
ASIO_DECL void use_tmp_dh(const const_buffer &dh)
ASIO_DECL void add_verify_path(const std::string &path)