function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cristian Di Curzio 3Cristian Di Curzio 3 

HTTPS Integration goes to Certificate Error (PKIX path building failed)

Hi!
I'm trying to establish an HTTPS connection to the customer's endpoint via APEX (using REST)
Until 11 February I had no problems and I called the service correctly, on 12 February the certificate expired. After a couple of days the certificate has been updated by the customer but I get this exception:

System.CalloutException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The certificate is signed by the CA: Thawte RSA CA 2018

I don't know how to manage it..
charforcecharforce
It sounds like your endpoint wasn't configured correctly when the new certificate was deployed. Salesforce only trusts Root CA certs in this list https://developer.salesforce.com/page/Outbound_Messaging_SSL_CA_Certificates, and it's up to your endpoint to send any required intermediate CA certificates during the SSL handshake.   

If you configure your endpoint to send the intermediate certificates your problem should be resolved https://help.salesforce.com/articleView?id=000186608&type=1