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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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