This problem is reproducible using Java Keytool Command:
For the below code sample, let's say that our password for the "key password" was set to 1234567 initially. Salesforce only requests the "keystore password" be set, so Salesforce needs to be able to decrypt the certificates with this alone by having the passwords match. Thus, when we run the below;
keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore-in-pkcs12.p12 -deststoretype PKCS12 Enter destination keystore password: <123456> Re-enter new password: <123456> Enter source keystore password: <123456> Enter key password for <salesforce> <123456> keytool error: java.security.UnrecoverableKeyException: Cannot recover key
The "keystore" and "key" passwords do not match, so it will throw an 'UnrecoverableKeyException' error.
Conclusion:
In order to avoid this error, ensure that the Private Key and the Keystore are encrypted using same password.
000387714

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.