Skip to content

Verify hostname according to rfc2818 #455

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

Merged
merged 7 commits into from
Oct 13, 2014
Merged

Verify hostname according to rfc2818 #455

merged 7 commits into from
Oct 13, 2014

Conversation

eakraly
Copy link

@eakraly eakraly commented Oct 12, 2014

Without this check HTTPS connection is vulnerable to MITM attack when the attacker would return a valid certificate but from wrong host.

@deanberris
Copy link
Member

@eakraly -- Can you please make sure the travis build is green?

@deanberris deanberris modified the milestones: 0.11.0, 0.11.1 Oct 13, 2014
@deanberris deanberris self-assigned this Oct 13, 2014
@@ -19,7 +19,7 @@ namespace impl {
struct normal_delegate : connection_delegate {
normal_delegate(asio::io_service &service);

virtual void connect(asio::ip::tcp::endpoint &endpoint,
virtual void connect(asio::ip::tcp::endpoint & endpoint, std::string host,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to change the declaration of connection_delegate::connect(...) to match this -- it's pure virtual there, and it causes the error.

@deanberris
Copy link
Member

In general, if you can run clang-format on the changes you're making (to keep it consistent with the surrounding code), then that would be most appreciated. A local build/test cycle (along with making sure Travis is happy) would also go a long way here. 😄

Thanks @eakraly!

@eakraly
Copy link
Author

eakraly commented Oct 13, 2014

Just wanted to make it clear - this issue is very serious security bug in the library that allows MITM attack on all TLS connections made by the library.

@deanberris
Copy link
Member

Thanks @eakraly -- yes, I understand it's serious. This makes me happy I waited before releasing 0.11.1. I'll roll a new RC soon enough.

Cheers

deanberris added a commit that referenced this pull request Oct 13, 2014
Verify hostname according to rfc2818
@deanberris deanberris merged commit 2028c55 into cpp-netlib:0.11-devel Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants