12 #ifndef ASIO_SSL_OLD_BASIC_CONTEXT_HPP 13 #define ASIO_SSL_OLD_BASIC_CONTEXT_HPP 15 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 17 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 21 #include <boost/noncopyable.hpp> 34 template <
typename Service>
37 private boost::noncopyable
49 impl_(service_.null())
51 service_.create(impl_, m);
57 service_.destroy(impl_);
84 service_.set_options(impl_, o, ec);
101 return service_.set_options(impl_, o, ec);
117 service_.set_verify_mode(impl_, v, ec);
134 return service_.set_verify_mode(impl_, v, ec);
150 service_.load_verify_file(impl_, filename, ec);
167 return service_.load_verify_file(impl_, filename, ec);
185 service_.add_verify_path(impl_, path, ec);
204 return service_.add_verify_path(impl_, path, ec);
220 service_.use_certificate_file(impl_, filename, format, ec);
237 return service_.use_certificate_file(impl_, filename, format, ec);
253 service_.use_certificate_chain_file(impl_, filename, ec);
270 return service_.use_certificate_chain_file(impl_, filename, ec);
286 service_.use_private_key_file(impl_, filename, format, ec);
303 return service_.use_private_key_file(impl_, filename, format, ec);
320 service_.use_rsa_private_key_file(impl_, filename, format, ec);
339 return service_.use_rsa_private_key_file(impl_, filename, format, ec);
355 service_.use_tmp_dh_file(impl_, filename, ec);
372 return service_.use_tmp_dh_file(impl_, filename, ec);
390 template <
typename PasswordCallback>
394 service_.set_password_callback(impl_, callback, ec);
413 template <
typename PasswordCallback>
417 return service_.set_password_callback(impl_, callback, ec);
422 service_type& service_;
434 #endif // ASIO_SSL_OLD_BASIC_CONTEXT_HPP void throw_error(const asio::error_code &err)
void load_verify_file(const std::string &filename)
Load a certification authority file for performing verification.
void add_verify_path(const std::string &path)
Provides core I/O functionality.
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.
asio::error_code set_verify_mode(verify_mode v, asio::error_code &ec)
Set the peer verification mode.
service_type::impl_type impl_type
The native implementation type of the SSL context.
asio::error_code use_certificate_chain_file(const std::string &filename, asio::error_code &ec)
Use a certificate chain from a file.
asio::error_code set_options(options o, asio::error_code &ec)
Set options on the context.
void use_rsa_private_key_file(const std::string &filename, file_format format)
Use an RSA private key from a file.
asio::error_code use_certificate_file(const std::string &filename, file_format format, asio::error_code &ec)
Use a certificate from a file.
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.
Service & use_service(io_service &ios)
asio::error_code set_password_callback(PasswordCallback callback, asio::error_code &ec)
Set the password callback.
Service service_type
The type of the service that will be used to provide context operations.
~basic_context()
Destructor.
void use_certificate_file(const std::string &filename, file_format format)
Use a certificate from a file.
void set_options(options o)
Set options on the context.
void set_password_callback(PasswordCallback callback)
Set the password callback.
method
Different methods supported by a context.
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.
basic_context(asio::io_service &io_service, method m)
Constructor.
asio::error_code add_verify_path(const std::string &path, asio::error_code &ec)
Class to represent an error code value.
long options
Bitmask type for SSL options.
void use_private_key_file(const std::string &filename, file_format format)
Use a private key from a file.
void use_certificate_chain_file(const std::string &filename)
Use a certificate chain from a file.
asio::error_code load_verify_file(const std::string &filename, asio::error_code &ec)
Load a certification authority file for performing verification.
void use_tmp_dh_file(const std::string &filename)
Use the specified file to obtain the temporary Diffie-Hellman parameters.
impl_type impl()
Get the underlying implementation in the native type.
void set_verify_mode(verify_mode v)
Set the peer verification mode.
file_format
File format types.