2

I'm facing “System.CalloutException: IO Exception: java.security.cert.CertificateException: No subject alternative names present” error when I try to make a callout to an external webservice. Problem is when I try it from SOAPUI webservice works ok.

When I try to open the endpoint from Chrome it says server certificate does not match with URL. I think problem might be about this. I've searched for this problem and I'm afraid it'll require for me to contact webservice provider. Is there any other way to fix this problem?

1

In brief, you will have to contact your webservice provider.

SAN (Subject Alternative Name) of Webervice is not matching the CN (Common Name) host name.

Try to set the certificate name as:

// Contact the service provider to get the name if not known.
request.setClientCertificateName('name_of_certificate').


If above step didn't work, you will have to do following steps to resolve this:

  1. Create 'CA-Signed' Certificate in Salesforce.
  2. Download Certificate Signing Request.
  3. Send the downloaded certificate to webservices provider for signing the certificate.
  4. Once the signed certificate is received, upload the signed certificate in your Salesforce.
  5. In apex code set certificate name by request.setClientCertificateName('name_of_certificate');.
  • After some mail traffic I get them to sign the certificate but this method did not work too. Is there any other way to solve this problem? – tugce Oct 22 '15 at 12:02

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.