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
Yiming ShenYiming Shen 

Can we upload a server CA-signed certification into Salesforce bypass sending CSR file to a seleted certificate authority ?

Hi all,
I need to make a call out from Salesforce to an external web service which we called it server, but it always shows me an exception: System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

I researched a lot of reference guides and I think this exception is due to Salesforce does not have a server certificate,fianlly, the server system refuses this request from Salesforce.

So far, the technician of the server system has already sent me a server-side certificate for valid connections. This server-side certificate is valid and can be used immediately. So I want to upload this server-side certificate into Salesforce directly instead I need to create a CA-signed certificate and send a CSR file to a seleted certificate authority afterwards.

The answer is very important for me. Could anyone help me ?
 
Thanks in advance.
BR
Yiming
Paras_BhattParas_Bhatt

Hi,

 

Under Setup >> Certificate and Key Management You willhave to upload the Certificate (While uploading you can give unique name that can be used to refer this certificate)

Now for each webservice callout, you will have to make use of this certificate.

Example
HttpRequest req = new HttpRequest();

req.setClientCertificateName('DocSampleCert');

 

Let me know if that works for you.

Thanks and Regards,

Paras Bhatt