Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8191865

keytool -help does not list all options

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • None
    • security-libs
    • None

      keytool -help does not list all options.
      keytool -help lists below options
      ==
      >keytool -help
      Key and Certificate Management Tool

      Commands:

       -certreq Generates a certificate request
       -changealias Changes an entry's alias
       -delete Deletes an entry
       -exportcert Exports certificate
       -genkeypair Generates a key pair
       -genseckey Generates a secret key
       -gencert Generates certificate from a certificate request
       -importcert Imports a certificate or a certificate chain
       -importpass Imports a password
       -importkeystore Imports one or all entries from another keystore
       -keypasswd Changes the key password of an entry
       -list Lists entries in a keystore
       -printcert Prints the content of a certificate
       -printcertreq Prints the content of a certificate request
       -printcrl Prints the content of a CRL file
       -storepasswd Changes the store password of a keystore

      Use "keytool -command_name -help" for usage of command_name.
      Use the -conf <url> option to specify a pre-configured options file.
      ==

      Missing options
      1) -keystore keystore can be directly used with keytool, keytool -help doesn't mention about that
      example - keytool -keystore $KS -genkey -dname CN=fmatte -storepass $PASSWORD

      2) -import can be directly used to import certificate
      example keytool -import -v -trustcacerts -alias keyAlias -file server.cer -keystore cacerts.jks

      3) -export can be directly used to export certificate to local file
      example keytool -export -alias keyAlias-storepass changeit -file server.cer -keystore keystore.jks

      4) -selfcert can be directly used for self signing certs

      5) -genkey can be directly used for generating key

            weijun Weijun Wang
            fmatte Fairoz Matte
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: