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

keytool should not echo keystore password when output piped through grep

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      Mac OS X, Java 1.8.0_172 and previous versions (also happens in debian-based linux systems)

      A DESCRIPTION OF THE PROBLEM :
      When keytool output is piped through grep (for instance to discover if a particular alias exists within the keystore) the password masking is disabled and the typed-in password is seen as plain text.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Execute a command similar to the following:

      $ sudo keytool -list -keystore ./lib/security/cacerts|grep somealias

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      When a password to the keystore is typed in, no characters are seen.
      ACTUAL -
      When a password to the keystore is typed in, it is seen in clear-text.

      FREQUENCY : always


            weijun Weijun Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: