How to extract all the .crt files and private key from a .jks file?

70 Views Asked by At

I have a .jks file that contains 5 .crt files and a private key and I want to extract all these 5 .crt files and also the private key from the .jks file. Is there a command to do that?

So my .jks file looks like that:

aaa, Dec 5, 2023, trustedCertEntry
Certificate fingerprint (SHA-256): ........
bbb, Dec 5, 2023, trustedCertEntry
Certificate fingerprint (SHA-256): ........
ccc, Dec 5, 2023, trustedCertEntry
Certificate fingerprint (SHA-256): ........
ddd, Dec 5, 2023, trustedCertEntry
Certificate fingerprint (SHA-256): ........
eee, Dec 5, 2023, trustedCertEntry
Certificate fingerprint (SHA-256): ........
fff, Dec 5, 2023, PrivateKeyEntry
Certificate fingerprint (SHA-256): ........

This .jks file was build from these 5 .crt files and the private key and now I want to obtain the 5 .crt files and the private key from this .jks file. So, I need a command to run it and to have 6 files, 5 .crt files and the private key. I need all these files because other people should have the possibility to recreate this .jks file using these files. Thank you!

0

There are 0 best solutions below