osx api-ng login issue with curl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raygerrard.
    Junior Member
    • Feb 2013
    • 1

    #1

    osx api-ng login issue with curl

    Hi all,

    I am having a look at working with the api with nodejs, I have created my application key and worked my way through the guide here: https://api.developer.betfair.com/se...28bot%29+login

    I am running OSX Mavericks and have been able to perform all the steps with some slight differences on OSX. I have uploaded the pem to betfair but when trying to verify everything is ok with (replacing user credentials and my application key):

    curl -q -k --cert client-2048.crt --key client-2048.key https://identitysso.betfair.com/api/certlogin -d "username=testuser&password=testpassword" -H "X-Application: curlCommandLineTest"

    I am getting the error: curl: (56) SSLRead() return error -9841

    I haven't been able to workaround this. I found an article here: http://curl.haxx.se/mail/archive-2013-10/0036.html that states that apple have replaced openssl since the integration of the keychain, I have imported client-2048.crt and client-2048.pem into my login keychain but this has not fixed the issue.

    Has anyone managed to get this working on Mavericks?

    Thanks.
  • andyn
    Junior Member
    • May 2012
    • 8

    #2
    Try putting your App key as the X-Application: value

    Comment

    • snowmoneky
      Junior Member
      • Feb 2014
      • 18

      #3
      I have the same problem. I've tried both app keys (the delayed and non-delayed) and get the same error message with both:

      curl: (56) SSLRead() return error -9841

      Also, I've tried importing my certificate into the java keystore, but when I post a login request I get a 200ok back, but the body looks like this:

      {"loginStatus":"CERT_AUTH_REQUIRED"}

      I'm stuck now. Have followed all the instructions, didn't get any error messages on the way... help!

      Comment

      • snowmoneky
        Junior Member
        • Feb 2014
        • 18

        #4
        Ah, curl on the mac - you need to drop the '-k'. So:

        curl -q --cert client-2048.crt --key client-2048.key https://identitysso.betfair.com/api/certlogin -d "username=your-user&password=your-pwd" -H "X-Application: your-key"

        However, I'm still getting:

        {"loginStatus":"CERT_AUTH_REQUIRED"}

        Comment

        Working...
        X