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

Explicitly disable server name indication #12

Merged
merged 1 commit into from
Sep 25, 2017

Conversation

jadeallenx
Copy link

@jadeallenx jadeallenx commented Sep 25, 2017

Server name indication is a way for a server to present multiple TLS certificates from a single IP address. As of OTP 20 the SSL application passed back the SNI information to the client so that it can be validated.

We restore the previous behavior by disabling this functionality explicitly.

The SNI disable option has existed since at least OTP 17 so it ought to be safe for several previous OTP releases.

Closes #11

%% We want the previous behavior which ignored the server name
%% indicator, so disable this. I believe this option has existed
%% since R16.
ssl:connect(Host, Port, Options ++ [{server_name_indication, disable}], Timeout);

Choose a reason for hiding this comment

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

should this be [{server_name_indication, disable} | Options ]? Meaning, is any other value basically incompatible with lhttpc?

Copy link
Author

@jadeallenx jadeallenx Sep 25, 2017

Choose a reason for hiding this comment

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

Probably would be better than what I have. I guess this way you could explicitly pass it and override the behavior though. But yes, any other option as of OTP 20 will fail the pattern matches in lhttpc_client at line 222.

Copy link

Choose a reason for hiding this comment

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

it should be first param anyway to make proplists:get work nicely if smb has actually passed smth

Copy link
Author

Choose a reason for hiding this comment

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

OK, I will change. 1 sec

Server name indication is a way for a server to present
multiple TLS certificates from a single IP address. As of OTP
20 the SSL application passed back the SNI information to the
client so that it can be validated.

We restore the previous behavior by disabling this
functionality explicitly.

The SNI disable option has existed since at least
OTP 17 so it ought to be safe for several previous
OTP releases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants