Monday, May 20, 2013

Import PKCS12 private keys into JKS keystores using Java Keytool

1) Import alice.p12 into alice.jks

keytool -v -importkeystore -srckeystore certifiate.p12 -srcstoretype PKCS12 -destkeystore mykeystore.jks -deststoretype JKS


* Create an new empty JKS store.

keytool -genkey -alias mykey -keystore keystore.jks
keytool -delete -alias mykey - keystore keystore.jks

1 comment:

  1. Hi there,
    I am having some trouble to import my p12 cert into jsk because usually the above command you wrote should work but what I get is:
    Illegal option: -importkeystore
    keytool usage:
    -certreq [-v] [-protected] page...etc........

    can you please advice?

    I am performing this on solaris 10 server