JDK-8218553 : Enhance keystore load debug output
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 8,11,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2019-02-06
  • Updated: 2021-03-18
  • Resolved: 2019-02-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 8 Other
11.0.5Fixed 13 b08Fixed 8u301Fixed openjdk8u252Fixed
Description
It's often difficult to find out if enterprise apps are using the correct keystore or if they're even finding one at all.

the java.security.debug system related properties could be used to print out the number and type of keys found in the various keystores.

e.g.
keystore: JavaKeyStore load: private key count: 0. trusted key count: 92
keystore: JceKeyStore load: private key count: 1. trusted key count: 1. secret key count: 1
pkcs12: PKCS12KeyStore load: private key count: 1. secret key count: 0. certificate count: 1
Comments
This isn't an Oracle JDK 8u feature parity patch. Only JDK 11u as far as I can tell. It's pretty low risk so I'm OK with it to go in.
20-12-2019

RFR: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-August/010126.html
22-08-2019

Please post for review.
21-08-2019

Fix Request (jdk8u) Requesting a jdk8u backport approval of this enhancement for Oracle feature parity. Patch applies cleanly except for paths, copyright dates and 1 import hook in JavaKeyStore.java (which does not justify a RFR as it's a trivial change). No regressions found in java/security/KeyStore test category.
09-08-2019

Fix Request (jdk11u) Requesting a jdk11u backport approval of this enhancement for Oracle feature parity. Patch applies cleanly except for 1 path (KeyStore.java renamed to CKeyStore.java) and 1 copyright date.
09-08-2019