jmeterkeystorep12

Merge .p12 files into single keystore


Need help regarding keystores. I have 2 .p12 files (we'll call them phil.p12 and grant.p12 for now).Both have different individual passwords.

I want to merge these into a single .p12 keystore for use in a Jmeter script where the different keys need to be called on depending on the case being executed.

Can anyone help me do this and give some advice on managing this?

For instance:
1) Is this even possible?
2) How do I deal with the fact that each individual cert has a different password?

Any help gratefully received.


Solution

    1. It is possible. You can use the keytool -importkeystore command to import an entire keystore into another keystore. So the command you need to run would look like

    keytool -importkeystore -srckeystore {SOURCE_KEYSTORE.p12} -srcstoretype pkcs12 -srcstorepass {PASSWORD} -destkeystore {DESTINATION_KEYSTORE.p2} -deststoretype pkcs12 -deststorepass {PASSWORD}

    1. You can have different passwords for your two different P12 keystroes. But for each keystore, the key pair entry's password (key password) should be the same as the keystore's password.

    The internet standard of a P12 is: