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

Use less strict cipher compatibility for OpenSSL client context #9459

Conversation

straight-shoota
Copy link
Member

Following the discussion in https://forum.crystal-lang.org/t/http-client-connection-reset-by-peer/2226 this separates the default cipher compatibility level for OpenSSL contexts:

  • OpenSSL::SSL::Context::Client uses OpenSSL::SSL::Context::CIPHERS_OLD
  • OpenSSL::SSL::Context::Server uses OpenSSL::SSL::Context::CIPHERS_INTERMEDIATE

This lets clients connect to servers which accept only weak ciphers, but a server only accepts relatively strong ciphers.

@straight-shoota straight-shoota added this to the 0.35.1 milestone Jun 11, 2020
@waj
Copy link
Member

waj commented Jun 11, 2020

@straight-shoota what are the default ciphers (if any) when the context is created? This change is probably the right way anyway, because it removes cipher suites already considered as "insecure" but I wonder if OpenSSL is not doing that already by default.

@straight-shoota
Copy link
Member Author

I don't know. And it seems to be pretty hart to dive into this.

IMO it's not worth considering because the defaults of openssl may change depending on the library version. And I think we should try to have the same default configuration for a Crystal program, regardless of the linked openssl version.

@waj
Copy link
Member

waj commented Jun 11, 2020

Yes, agree 100%

@bcardiff bcardiff merged commit 224e41b into crystal-lang:master Jun 12, 2020
@straight-shoota straight-shoota deleted the feature/openssl-context-cipher-config branch June 12, 2020 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants