taf2/curb — Issue #87: Error when setting SSL cert
Author: RedlightG20
Created: 2011-10-13 20:07:33+00:00
State: open

I am receiving the following error (when calling curl.perform) when attempting to specify an SSL certificate to perform a GET on some internal websites.

quicktest.rb:13:in `add': can't convert nil into String (TypeError)
from quicktest.rb:13:in `perform'
from quicktest.rb:13:in `block in

'

Here is my test code:

require 'curb'

SSL_CERT = 'path/to/my/cert'
SSL_KEY = 'path/to/my/key'

curl = Curl::Easy.new(xx.xx.xx.xx)
curl.verbose = true
curl.cert = SSL_CERT
curl.cert_key = SSL_KEY
curl.follow_location = true
curl.ssl_verify_host = false
curl.ssl_verify_peer = false
curl.perform

From the command line, curl works fine passing the --insecure, --key, and --cert args with the above cert/key combo. I'm running this on RHEL5, curl/libcurl 7.15. Also tried on a Win2003 box with 7.22, same issue. Curb v7.15 on both.

I was wondering if the solution would be similar to the typo found at https://github.com/taf2/curb/issues/70.

Thanks!