-
Notifications
You must be signed in to change notification settings - Fork 425
Add documentation for SSL support #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for SSL support #398
Conversation
boost::asio::ssl::context::default_workarounds | ||
| boost::asio::ssl::context::no_sslv2 | ||
| boost::asio::ssl::context::single_dh_use); | ||
context_.set_password_callback(boost::bind(&server::get_password, this)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "this" in the bind call?
I based the example on the boost example (http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/example/cpp03/ssl/server.cpp), which put the method in a class (which is why the this was there). I could change it to something like this: std::string password_callback(std::size_t max_length, boost::asio::ssl::context_base::password_purpose purpose) {
return std::string("test");
}
...
context_.set_password_callback(password_callback); To get the same functionality. I think that might be better? |
I think it's best to have an example of the SSL server that you can build/test locally that's also part of the project. If you put something in lib/network/example along in this pull request, then reflect what the code actually looks like here. |
I'll create an example based on my local server setup. I'll add it to the pull request, change the documentation and get back to you. |
Awesome, thanks @jellevdd for doing this! |
Created a simple example Uptate to the documentation based on created simple ssl server Small bugfix to allow clean shutdown of server without warnings when using basic ssl (no client authentication)
@deanberris I've added a basic example based one of the existing async server examples. I've added a self-signed private key/certificate (valid for 10 years) to the example to simplify testing. |
@jellevdd Thanks! This looks awesome. :) Thank you very much for doing this. I'm merging this in, and if you can make an announcement to the mailing list, that would be greatly appreciated too. Having testers give this a go would be great for the project and hopefully we can get a new release rolled out soon after. |
Add documentation for SSL support, fix shutdown issues with exceptions.
Add documentation for SSL support, fix shutdown issues with exceptions.
Initial documentation for adding SSL support to async server.