Skip to content
This repository was 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
monical75 wants to merge 3 commits into
vmware-archive:masterfrom
monical75:master
Open

Added an optional parameter to manage ciphers list to the Connection#initializer#52
monical75 wants to merge 3 commits into
vmware-archive:masterfrom
monical75:master

Conversation

@monical75

Copy link
Copy Markdown

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

coveralls commented Sep 9, 2019

Copy link
Copy Markdown

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