2

I am trying to invoke 3rd party web-services from Salesforce using WSDL2APEX. The client has also shared a .p12 certificate which I need to use for client authentication while making web-service call from Salesforce along with username and password.

I converted above .p12 into base64 using openSSL and tried below:

stub.clientCert_x = 'base64encodedstring';
stub.clientCertPasswd_x = 'password used for importing .pfx (password used for protecting private key)'

I am not sure above password is same as keystore password. But this method is not working.

I converted .p12 into .jks and imported the same in Salesforce and used below:

stub.clientCertName_x = 'CertificateUniqueName';

Even above method didn't work. Tried the same with HTTP callouts, but no luck.

I am not sure where I am going wrong. I am getting response from the server that authentication certificate is missing, hence I believe that the callout is successful.

My client has used "GlobalSign Root CA" which is supported by Salesforce.

Please let me know if my approach is wrong. Should I first export .p12 into public and private keys and then use it ?

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.