|
Boost : |
From: Dirk Griffioen (a.griffioen4_at_[hidden])
Date: 2005-08-29 05:31:56
Hi All,
We would like to make the remark we created a first version of a secure
(ssl/tls) extension to ASIO.
It's use should be regarded as an extension to ASIO and configurable
with the type of ssl a user has.
From the test code (the server):
#define HAS_OPENSSL
#include <asio.hpp>
When the server accepts a connection it then calls handle_accept to
secure the socket:
void handle_accept(const asio::error& error)
{
if (!error)
{
std::cout << "server connected..." << std::endl;
// Secure the connection
socket_.async_secure(
boost::bind(&impl::handle_secure, this, asio::arg::error)
);
After that it's a matter of async_recv/send - but the connection now is
secure.
the variable needed is:
asio::tls_socket socket_;
Additions to ASIO are:
basic_secure_socket.hpp
detail/openssl_crypto_initializer.hpp
detail/openssl_secure_service.hpp
detail/openssl_secure_session.hpp
(And (to a lesser extent) the same for GnuTls.)
Our question is, can we donate this to (boost::)asio?
And if so, how do we approach this?
Cheers, Dirk
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk