Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Common Keytool commands

Shulou Source: shulou.com Published: 2022-06-01 06:31:51 10月03日 Update

Keytool is a tool for managing security keys and certificates in JAVA environment. It manages a keystore that stores private keys and validates the X.509 certificate chain associated with them (equivalent to a database that holds multiple X.509 standard certificates).

Common Keytool commands:

Check a keystore

Keytool-list-v-keystore c:\ server.jks check the contents of a keystore

Keytool-list-v-keystore c:\ server.jks

Add a trust root certificate to the keystore file

Keytool-import-alias newroot-file root.cer-keystore server.jks

Import a signed certificate from CA

Keytool-import-keystore c:\ server.jks-alias tomcat-file c:\ cert.txt

Export a certificate file from KEYSTORE

Keytool-export-alias myssl-keystore server.jks-rfc-file server.cer

* Note: "- rfc" means to output the file as base64, otherwise as binary.

Delete a certificate from KEYSTORE

Keytool-delete-keystore server.jks-alias tomcat

* Note: the certificate aliased as tomcat has been deleted.

Tags: Certificates files keys comments checks management output commands commonly used security binary content multiple tools data databases standards environment management tools guide Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Technology Linux Huawei vpn