Sometimes Certificate signing authorities send back a certificate signing request not in a format Salesforce supports (CRT, CER, JKS), but as PFX or P12. In these cases, you cannot upload the signed certificate as a match to the certificate signing request.
This article shows how to break up the PFX or P12 certificate into its single parts, and stack them together as Salesforce-supported JKS (JavaKeystore) file.
You'll perform the various steps based on the notes below if you have a signed certificate as PFX or PF12.
openssl pkcs12 -in certname.p12 -nocerts -out privateKey.pem -nodes
This returns a password-protected private key.
5. Run the below command to export the public key from the pkcs12 file:
openssl pkcs12 -in certname.p12 -clcerts -nokeys -out publicCertNew.pem
6. Convert the private key into pkcs8 format:
openssl pkcs8 -topk8 -in privateKey.pem -out privateKey-pkcs8.pem
7. Import the private key and certificate chain into a new pkcs12 file for each certificate:
openssl pkcs12 -export -in publicCertNew.pem -inkey privateKey-pkcs8.pem -name demotest1 -out demotest1.p12
8. Import those pkcs12 files into a Java keystore file:
keytool -v -importkeystore -srckeystore demotest1.p12 -srcstoretype PKCS12 -destkeystore demotest1.jks -deststoretype JKS
9. Upload the JKS file to Salesforce (Setup | Security | Certificate and Key Management | Import from Keystore).
Generating a PFX format for a certificate - Trailblazer Community
Importing a Java keystore (JKS) yields a "keystore file is corrupted" message - Salesforce Stack Exchange
Know more about all the SSL certificates that are supported by Salesforce
000381987

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.