JDK-8076190 : Customizing the generation of a PKCS12 keystore
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-03-27
  • Updated: 2021-04-05
  • Resolved: 2018-12-13
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 12 JDK 13 JDK 7 JDK 8
11-poolUnresolved 12 b24Fixed 13Fixed 7u311Unresolved 8u301Unresolved
Related Reports
Blocks :  
Blocks :  
CSR :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8215293 :  
JDK-8215387 :  
Description
The KeyStore.load API allows the supplied password to be null, to indicate that the keystore integrity check should be skipped. When the password is null the PKCS12 implementation returns no certificates.

This behaviour differs from JKS where certificates can be retrieved even when a null password is supplied. We should find a way to generate a PKCS12 keystore without encrypting the certificates. Furthermore, in order to completely remove the requirement of a password (when hardcoded or well-known is a security issue), we should also make the Mac part of the PKCS12 keystore optional.

Ultimately, all algorithms and parameters used in encrypting the keys, the certificates (or not encrypting), and calculating the Mac (or not calculating) should be customizable.

Comments
Fix request (11u) I would like to backport JDK-8076190 to 11u. The patch applies cleanly except of test/lib/jdk/test/lib/security/DerUtils.java which is already backported to 11u as part of JDK-8215694 (see https://hg.openjdk.java.net/jdk-updates/jdk11u/rev/551bc745f05d#l9.1) This feature minimizes behavior differences between JKS and PKCS12 keystores. Also, it fixes the issue with incorrectly decoded KDF algorithm as described in JDK-8245169 Review is started at https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-December/004335.html
03-12-2020