Open rbahegne opened 3 days ago
My first question - crow is normally build with standalone asio, you are using boost::asio classes for the ssl_context, that will not work to mix asio and boost::asio.
It is possible to build crow with boost using CMake Option CROW_USE_BOOST or alternatively rename all the boost::asio... types to asio::.. types in your sources.
You are right i mixed up things a little bit.
So i have add_definitions(-DCROW_USE_BOOST)
on my cmake.
So using boost look like this :
crow::SimpleApp app;
boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23);
app.port(443).ssl(ctx).multithreaded().run();
I still get
error: cannot bind rvalue reference of type ‘boost::asio::ssl::context&&’ to lvalue of type ‘boost::asio::ssl::context’
app.port(443).ssl(ctx).multithreaded().run();
It expects a double &&, not sure why and how to initiate this kind of thing. Also in this example it looks simple.
In fact i don't really needs a custom ctx, i just want mutual authentification. With the .ssl i can directly provide a cert and key but no CA. Is ssl_file or ssl_chainfile is the way to go ? I'm not so sure of the difference between CA and chainfile.
Just move your context ;)
app.port(443).ssl(std::move(ctx)).multithreaded().run();
Hello, i'm trying to setup a custom context as described is the example :
But it won't compile :
Any hint ?