savonrb / httpi

Common interface for Ruby's HTTP clients
http://httpirb.com
MIT License
301 stars 151 forks source link

Add SSL min/max_version configuration for supporting adapters #208

Closed mrpasquini closed 4 years ago

mrpasquini commented 4 years ago

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 commented 4 years ago

Coverage Status

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

mrpasquini commented 4 years ago

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