2

I'm using WebServiceCallout.invoke in an Apex class to call an external SOAP web service (namely the SOAP API for Central Desktop).

Unfortunately, the external service has an invalid SSL certificate for its API endpoint, so I'm getting the following error:

System.CalloutException: IO Exception: java.security.cert.CertificateException:
No subject alternative DNS name matching accountname.api.centraldesktop.com found.

The problem is basically that the external service has a wildcard certificate for *.centraldesktop.com but the certificate is not valid for *.api.centraldesktop.com. Therefore, the API endpoint causes this error.

Ideally the external service can fix its SSL certificate, but barring that option, I'm looking for a work-around in Salesforce. Is there a way to ignore the certificate error when using WebServiceCallout.invoke in Salesforce?

2

Is there a way to ignore the certificate error when using WebServiceCallout.invoke in Salesforce?

Nope - no SSL_VERIFYPEER or SSL_VERIFYHOST flags for you to set here ;-) but:

  1. can you try api.centraldesktop.com or accountname.centraldesktop.com

  2. definitely approach the vendor as you've indicated (you won't be the first!)

  3. you could proxy the requests and disregard the certificate/hostname mismatch on your proxy

  • Unfortunately api.centraldesktop.com and accountname.centraldesktop.com are not valid endpoints in this case (if only!). The proxy is an interesting idea if CentralDesktop can't fix the problem quickly... – Travis Dec 27 '13 at 23:54
  • If they support HTTP without SSL that's an option, albeit a bad one. – ca_peterson Dec 28 '13 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.