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
Yogesh AroraYogesh Arora 

Consuming Non-Salesforce CA signed certificate in Salesforce

Hi,

I am working on integrating salesforce with an external service. They have provided me with a signed certificate, which i need to send along with the request. I am not sure how should I do that? Where in Salesforce can I store an already signed certificate?

Thanks in advance for any help.

Yogesh
Ramu_SFDCRamu_SFDC
Follow the guidelines explained in the below article

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_client_certs.htm
Vinit_KumarVinit_Kumar
You can't store any Client certificate inside salesforce.If you want to generate certificate then you will have to use Apex to generate certificate along with your Apex Callouts.

Go through the below link ,it has a sample certificate generated by Apex Class :-

https://developer.salesforce.com/forums?id=906F00000008wSGIAY
Yogesh AroraYogesh Arora

Hi Vinit,
 

Thanks for the help. I have gone through the link provided by you. I am able to extract the private key from the certificate, but what would be the input string for me, when using Crypto.sign() method?

PS: I am making a GET call to a RESTful webservice. So unlike POST request, I dont need to specify body of the request.

Vinit_KumarVinit_Kumar
Yogesh,

The way I would approach this is to have the certificate uploaded in an Integration tool (ex.  SoapUI) and generate a valid SOAP request through it and then I will copy the whole request and try to get the same String in salesforce.

This is how I will fetch my signatureString.