All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.vt.middleware.crypt.KeyStoreCli.examples Maven / Gradle / Ivy

There is a newer version: 2.2
Show newest version
 - Print contents of a JKS keystore

   keystore -list -keystore path/to/keystore.jks -storepass changeit


 - Import a trusted PEM-encoded X.509 certificate into a BKS keystore

   keystore -import -keystore path/to/keystore.bks -storetype bks \
            -storepass changeit -alias mycert -cert path/to/cert.pem


 - Import a key pair consisting of a DER-encoded PKCS#8 RSA key and a
   PEM-encoded X.509 certificate into a JKS keystore

   keystore -import -keystore path/to/keystore.jks -storepass changeit \
            -alias mykeypair -cert path/to/cert.pem -key path/to/rsa-p8-key.der


 - Export a trusted certificate to a PEM-encoded file
   (PEM-encoded key is determined by .pem file extension)
 
   keystore -export -keystore path/to/keystore.jks -storepass changeit \
            -alias mycert -cert path/to/exported/cert.pem


 - Export key and certificate of a keypair entry to DER-encoded files
 
   keystore -export -keystore path/to/keystore.jks -storepass changeit \
            -alias mykeypair -cert path/to/exported/cert.der \
            -key path/to/exported/key.der




© 2015 - 2025 Weber Informatics LLC | Privacy Policy