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

Add SSL min/max_version configuration for supporting adapters #208

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

mrpasquini
Copy link
Contributor

ssl_version is deprecated and only provided for backwards compatibility. Documentation says to use min_version= and max_version= instead.

This PR adds support for these configuration options for the adapters that support them. HTTPI::NotImplementedError are raised for Curb and HttpClient that do not support these configuration options.

A new static HTTPI::SSL::MIN_MAX_VERSIONS is introduced to list the supported verions for min/max_verions. This is different than HTTPI::SSL::SSL_VERSIONS as the ssl_version value would be TLSv1_2 where the min/max_version value is TLS1_2

@coveralls
Copy link

coveralls commented Jul 7, 2020

Coverage Status

Coverage decreased (-0.5%) to 96.601% when pulling 3183c55 on mrpasquini:ssl_min_max_version into 2fbd6b1 on savonrb:master.

Copy link
Member

@rogerleite rogerleite left a comment

Choose a reason for hiding this comment

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

Hey @mrpasquini
Thanks for the PR. I didn't know about this deprecation.

I think the PR is good, I just put some comments to improve usability.

lib/httpi/adapter/curb.rb Outdated Show resolved Hide resolved
lib/httpi/adapter/httpclient.rb Outdated Show resolved Hide resolved
lib/httpi/auth/ssl.rb Outdated Show resolved Hide resolved
lib/httpi/auth/ssl.rb Outdated Show resolved Hide resolved
lib/httpi/auth/ssl.rb Outdated Show resolved Hide resolved
@mrpasquini
Copy link
Contributor Author

Thank you for the suggestions. I have incorporated them and updated the related tests to check for the new errors.

Copy link
Member

@rogerleite rogerleite left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

@rogerleite rogerleite merged commit 97121c6 into savonrb:master Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants