1

I am interacting with an API that requires SSL3.

From the command line I form the request like:

 curl -ssl3 -H 'Authorization: Bearer XXXX' https://capi-eval.signnow.com/api/user/documentsv2 

With curb I have implemented:

  c = Curl::Easy.new("https://capi-eval.signnow.com/api/document") do |curl|
  curl.headers["Authorization"] = "Bearer XXXX"
  curl.use_ssl = true
  curl.ssl_version = "ssl3"
    end

This ssl_version method seem like it should do the same thing as the -ssl3 switch the error message that results is:

1.9.3-p286 :082 > c.perform
Curl::Err::SSLConnectError: Curl::Err::SSLConnectError

Do you know how to properly create the curb request?

deltheil
  • 15,496
  • 2
  • 44
  • 64
Mike Simmons
  • 328
  • 3
  • 14

1 Answers1

1

I realized that the ssl flags require integers. this works.

c = Curl::Easy.new("https://capi-eval.signnow.com/api/documentsv2") do |curl|
  curl.headers["Bearer"] = "XXXX"
  curl.verbose = true
  curl.use_ssl = 3
  curl.ssl_version = 3
end
Mike Simmons
  • 328
  • 3
  • 14