Java p12 Generation from a existing keys
问题 I'm writing a program in Java that generates RSA keys using Crt parameters. I'm able to export the key in a .pem file, but I need to export it in a pkcs12 file. How can I do that in Java? 回答1: Java contains native support for PKCS#12 key stores through KeyStore.getInstance("PKCS12") . However, generally the key stores require you to offer a matching private key / certificate pair. Just providing a public key instead of a certificate is not enough. You must create a certificate, for instance a