How can one use cpp-netlib to implement a HTTPS-server?
The following questions stop me from combining asio SSL and cpp-netlib:
Both SSL via asio and cpp-netlib use an asio acceptor that listens to a port (e.g. 80 or 443) and then a separate session for the actual connection.
I assume that for HTTPS:
But how can I separate cpp-netlib's HTTP connection handler from the acceptor is uses?
Or does one pass a io_service from the asio SSL connection? If so, which one? Or are they all the same?
Or is there a completely different route to take?
A long shot, but have you tried the following:
#define BOOST_NETWORK_ENABLE_HTTPS
before including the boost network http client.
Make sure OpenSSL
is in the compiler path.
The most recent release of cpp-netlib contains a working example. You'll find it in cpp-netlib-0.11.1RC2/libs/network/example/http/ssl. The github files are there: https://github.com/cpp-netlib/cpp-netlib/tree/0.11-devel/libs/network/example/http/ssl
You have to use an async_server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With