Skip to content
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

Set SSL SNI even when server verification is disabled #8899

Merged
merged 1 commit into from Jul 7, 2023

Conversation

vtnerd
Copy link
Contributor

@vtnerd vtnerd commented Jun 9, 2023

This was found while running LWS, but I don't see a reason to not fix this upstream.

Someone was trying a connection to a cloudflare site (webhooks) - which requires SSL SNI usage to work correctly - and combined it with a call to not verify the cloudflare server. It took me a while to track down the issue: we only set SNI when verifying the server certificate. There's no reason for this, it can be used with or without verifying the certificates.

@@ -497,6 +497,13 @@ void ssl_options_t::configure(
const std::string& host) const
{
socket.next_layer().set_option(boost::asio::ip::tcp::no_delay(true));
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like the superfluous braces, but besides that, looks good to me!

@luigi1111 luigi1111 merged commit 9537329 into monero-project:master Jul 7, 2023
18 checks passed
@vtnerd vtnerd deleted the fix/unverified_sni branch April 1, 2024 00:23
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.

None yet

3 participants