Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@jellevdd
Copy link

Initial documentation for adding SSL support to async server.

Copy link
Member

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?

@jellevdd
Copy link
Author

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::stringpassword_callback(std::size_t max_length, boost::asio::ssl::context_base::password_purpose purpose) {returnstd::string("test");}...context_.set_password_callback(password_callback);

To get the same functionality. I think that might be better?

@deanberris
Copy link
Member

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.

@jellevdd
Copy link
Author

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.
Thanks for the help!

@deanberris
Copy link
Member

Awesome, thanks@jellevdd for doing this!

Created a simple exampleUptate to the documentation based on created simple ssl serverSmall bugfix to allow clean shutdown of server without warnings whenusing basic ssl (no client authentication)
@jellevdd
Copy link
Author

@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.
The documentation has been updated to mirror the example.
While testing basic ssl I've also noticed a small bug which was causing a warning to be thrown during shutdown of the socket when using basic ssl (I tested using mutual authentication which did not cause any issues). I've added the fix to the shutdown as well.

@deanberris
Copy link
Member

@jellevdd Thanks! This looksawesome. :)

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.

deanberris added a commit that referenced this pull requestMay 22, 2014
Add documentation for SSL support, fix shutdown issues with exceptions.
@deanberrisdeanberris merged commitc15e98f intocpp-netlib:0.11-develMay 22, 2014
@jellevddjellevdd deleted the 0.11-devel-integration branchMay 22, 2014 07:44
leecoder pushed a commit to leecoder/cpp-netlib that referenced this pull requestApr 14, 2015
Add documentation for SSL support, fix shutdown issues with exceptions.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@jellevdd@deanberris

[8]ページ先頭

©2009-2025 Movatter.jp