LibCurl: res=60 "SSL peer certificate or SSH remote key was not OK"

I’m using Mike Duglas’ LibCurl to post some data to a website and getting the “SSL peer certificate or SSH remote key was not OK” response, howver I am setting …

  curl.SetSSLVerifyHost(false)  ! do not verify host name
  curl.SetSSLVerifyPeer(false)   ! do not verify peer
  curl.SetSSLVersion(CURL_SSLVERSION_TLSv1_3)    ! Must be TLS 1.3 as at 01/05/2024

…so I thought I shouldn’t be getting this error?

As a side note, this was working 6 weeks ago without error?

Anyone have some tips?

Look at the DebugView log, it can contain more details.
Try to reproduce with curl.exe. If it fails with same error, ask website support team to help you fix it.

1 Like

Thanks Mike, I tried it and it’s working OK using curl from the commandline.

This is the log file from debugview, the error is on line 22. I’ve downloaded the .crt file from the site and specified that in my libCurl options but still no joy.

Hi Mike,

Sorry to trouble you, I eventually found what I was doing wrong!

I was calling curl.ini again after I had set all the properties, so they were being overwritten!