I have an app in Salesforce developed in APEX. This app will use REST API exposed by another app running in EC2. The REST API running in EC2 is having signed certificate, but the host name does not match with CN of certification

hostname is something like ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com CN in certification is like myorg.com. As the host name and CN does not match we are getting the below error

java.security.cert.CertificateException: No subject alternative DNS name matching ec2-xx-xx-xxx-xx.us-west-2.compute.amazonaws.com found.

Is it possible to turn of host name verifier in APEX during rest calls?

In Java we can either add the certificate to cacerts or disable hostname verification. How can we do the same in APEX?

Your Answer

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

Browse other questions tagged or ask your own question.