Getting cURL working on OSX Mavericks with self-signed client SSL certificate

So, here’s what you’re going to have to do to get this to work:

  1. Install the latest curl. I used MacPorts to get 7.35, but all the cool kids use Homebrew. Unfortunately, `brew doctor` has a very long list of complaints ever since installing some libraries (*cough* libusb libfreenect *cough* you bastards *cough*) to play around with the Kinect sensor. so `port install curl +ssl` it is. The +ssl is a variant, which I hadn’t used before. \
  2. It’s going to be /opt/local/bin/curl, (at least, it was for me) so check your $PATH or `curl -V`
  3. I played it safe, and opened the openssl-created certificate in Keychain access and added it to the login keychain.

Now you should be able to successfully log in with:

curl -v -q -k -E client-2048.pem https://identitysso.betfair.com/api/certlogin -d “username=XXXXXXXX&password=YYYYYYYY” -H “X-Application: commandLineTest”
Response:
{“sessionToken”:”Y5aYvLMyN3V8rsJzQ5x6haDNzYQd2Fu7zPfsNGnRaJc=”,”loginStatus”:”SUCCESS”}
Well, I managed to successfully login after a few hours of effort!

One thought on “Getting cURL working on OSX Mavericks with self-signed client SSL certificate

  1. Pingback: OSX Mavericks broke cURL use with self-signed client certificates. | Epiphanies | Luke Toop

Leave a Reply

Your email address will not be published. Required fields are marked *