| Home | Libraries | People | FAQ | More

# boost::asio::ssl::context_service Class Reference

Inherits boost::asio::io_service::service.

Inheritance diagram for boost::asio::ssl::context_service:

List of all members.

## Detailed Description

Default service implementation for a context.

## Public Types

typedef implementation_defined | impl_type
| The type of the context.

## Public Member Functions

| context_service (boost::asio::io_service &io_service)
| Constructor.
void | shutdown_service ()
| Destroy all user-defined handler objects owned by the service.
impl_type | null () const
| Return a null context implementation.
void | create (impl_type &impl, context_base::method m)
| Create a new context implementation.
void | destroy (impl_type &impl)
| Destroy a context implementation.
template<typename Error_Handler>
void | set_options (impl_type &impl, context_base::options o, Error_Handler error_handler)
| Set options on the context.
template<typename Error_Handler>
void | set_verify_mode (impl_type &impl, context_base::verify_mode v, Error_Handler error_handler)
| Set peer verification mode.
template<typename Error_Handler>
void | load_verify_file (impl_type &impl, const std::string &filename, Error_Handler error_handler)
| Load a certification authority file for performing verification.
template<typename Error_Handler>
void | add_verify_path (impl_type &impl, const std::string &path, Error_Handler error_handler)
| Add a directory containing certification authority files to be used for performing verification.
template<typename Error_Handler>
void | use_certificate_file (impl_type &impl, const std::string &filename, context_base::file_format format, Error_Handler error_handler)
| Use a certificate from a file.
template<typename Error_Handler>
void | use_certificate_chain_file (impl_type &impl, const std::string &filename, Error_Handler error_handler)
| Use a certificate chain from a file.
template<typename Error_Handler>
void | use_private_key_file (impl_type &impl, const std::string &filename, context_base::file_format format, Error_Handler error_handler)
| Use a private key from a file.
template<typename Error_Handler>
void | use_rsa_private_key_file (impl_type &impl, const std::string &filename, context_base::file_format format, Error_Handler error_handler)
| Use an RSA private key from a file.
template<typename Error_Handler>
void | use_tmp_dh_file (impl_type &impl, const std::string &filename, Error_Handler error_handler)
| Use the specified file to obtain the temporary Diffie-Hellman parameters.
io_service & | owner ()
| Get the io_service object that owns the service.

## Member Typedef Documentation

typedef implementation_defined boost::asio::ssl::context_service::impl_type

The type of the context.

## Constructor & Destructor Documentation

boost::asio::ssl::context_service::context_service | ( | boost::asio::io_service & | io_service | ) | `[explicit]`

Constructor.

## Member Function Documentation

void boost::asio::ssl::context_service::shutdown_service | ( |  | ) | `[virtual]`

Destroy all user-defined handler objects owned by the service.

Implements boost::asio::io_service::service.

impl_type boost::asio::ssl::context_service::null | ( |  | ) | const

Return a null context implementation.

void boost::asio::ssl::context_service::create | ( | impl_type & | impl,
|  | context_base::method | m |
| ) |  |  |

Create a new context implementation.

void boost::asio::ssl::context_service::destroy | ( | impl_type & | impl | ) |

Destroy a context implementation.

template<typename Error_Handler>

void boost::asio::ssl::context_service::set_options | ( | impl_type & | impl,
|  | context_base::options | o,
|  | Error_Handler | error_handler |
| ) |  |  |

Set options on the context.

template<typename Error_Handler>

void boost::asio::ssl::context_service::set_verify_mode | ( | impl_type & | impl,
|  | context_base::verify_mode | v,
|  | Error_Handler | error_handler |
| ) |  |  |

Set peer verification mode.

template<typename Error_Handler>

void boost::asio::ssl::context_service::load_verify_file | ( | impl_type & | impl,
|  | const std::string & | filename,
|  | Error_Handler | error_handler |
| ) |  |  |

Load a certification authority file for performing verification.

template<typename Error_Handler>

void boost::asio::ssl::context_service::add_verify_path | ( | impl_type & | impl,
|  | const std::string & | path,
|  | Error_Handler | error_handler |
| ) |  |  |

Add a directory containing certification authority files to be used for performing verification.

template<typename Error_Handler>

void boost::asio::ssl::context_service::use_certificate_file | ( | impl_type & | impl,
|  | const std::string & | filename,
|  | context_base::file_format | format,
|  | Error_Handler | error_handler |
| ) |  |  |

Use a certificate from a file.

template<typename Error_Handler>

void boost::asio::ssl::context_service::use_certificate_chain_file | ( | impl_type & | impl,
|  | const std::string & | filename,
|  | Error_Handler | error_handler |
| ) |  |  |

Use a certificate chain from a file.

template<typename Error_Handler>

void boost::asio::ssl::context_service::use_private_key_file | ( | impl_type & | impl,
|  | const std::string & | filename,
|  | context_base::file_format | format,
|  | Error_Handler | error_handler |
| ) |  |  |

Use a private key from a file.

template<typename Error_Handler>

void boost::asio::ssl::context_service::use_rsa_private_key_file | ( | impl_type & | impl,
|  | const std::string & | filename,
|  | context_base::file_format | format,
|  | Error_Handler | error_handler |
| ) |  |  |

Use an RSA private key from a file.

template<typename Error_Handler>

void boost::asio::ssl::context_service::use_tmp_dh_file | ( | impl_type & | impl,
|  | const std::string & | filename,
|  | Error_Handler | error_handler |
| ) |  |  |

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

io_service & boost::asio::io_service::service::owner | ( |  | ) | `[inherited]`

Get the io_service object that owns the service.

| Copyright © 2003 - 2006 Christopher M. Kohlhoff