edu.vt.middleware.crypt.KeyStoreCli.examples Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vt-crypt Show documentation
Show all versions of vt-crypt Show documentation
Library for performing common cryptographic operations
- 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