Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Added an optional parameter to manage ciphers list to the Connection#initializer #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

monical75
Copy link

When I try to connect to vcloud I run into "SSL_connect returned=1 errno=0 state=error: dh key too small (OpenSSL::SSL::SSLError)" error
The problem is due to the different versions of SSL between client and server.
As suggested in this article https://zackhobson.com/2014/02/10/ssl_and_ruby_part_2/, it's enough providing the ciphers list in the connection.

So I solved this problem by adding an optional parameter to the Connection#initliaze

initialize(host, username, password, org_name, api_version, opts={})

Then I use this new paramter in setup_request(params, payload=nil, content_type=nil)

unless @opts.empty?
req_params.merge!({ssl_ciphers: @opts[:ssl_ciphers] }) if @opts[:ssl_ciphers]
end

@coveralls
Copy link

coveralls commented Sep 9, 2019

Coverage Status

Coverage increased (+0.06%) to 71.392% when pulling 04179f6 on monical75:master into 45425d9 on vmware:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants