Its a callout ,Whenever I try to connect with Secured Gateway, it fails I have given then client certificate of salesforce env. Do you think Iam missing anything here .Please help
When a client certificate (it has to be CA signed of course) is used to authenticate user, server/gateway has to somehow recognize appropriate certificates. That is easy to understand when you visit some website which requires a client certificate and popup shows with some certificate listed. As you might concluded there are not presented all certificates, but just some certain ones.
To achieve the same behaviour, you have to put CA public key into CA.crt file on server which will "match" client certificate. In other words, your gateway needs to recognize client cert and the only way this is possible, that gateway includes public key of CA which signed that client certificate (just concatenate all possible CA public keys into one file). See below.
- Create CSR (in SF)
- Sign that with CA private key (you have to create CA key)
- Include CA public key (in Apache this property is called SSLCACertificateFile)
- Covert your existing client certificate which is CA signed to keystore (jks file)
- Import that jks to SF with Import from keystore command.
- Retrieve public key from Salesforce.com (it states here that all self-signed certificate inside SF are signed by Salesforce) https://help.salesforce.com/HTViewHelpDoc?id=security_keys_about.htm&language=en_US