Skip to content

Commit cfcba1f

Browse files
committed
8285827: Describe the keystore.pkcs12.legacy system property in the java.security file
Reviewed-by: mullan
1 parent 7020595 commit cfcba1f

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/java.base/share/conf/security/java.security

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,10 +1166,30 @@ jceks.key.serialFilter = java.base/java.lang.Enum;java.base/java.security.KeyRep
11661166
# If a system property of the same name is also specified, it supersedes the
11671167
# security property value defined here.
11681168
#
1169-
# If the property is set to an illegal value,
1170-
# an iteration count that is not a positive integer, or an unknown algorithm
1171-
# name, an exception will be thrown when the property is used.
1172-
# If the property is not set or empty, a default value will be used.
1169+
# If the property is set to an illegal value, an iteration count that is not
1170+
# a positive integer, or an unknown algorithm name, an exception will be thrown
1171+
# when the property is used. If the property is not set or empty, a default
1172+
# value will be used.
1173+
#
1174+
# Some PKCS12 tools and libraries may not support algorithms based on PBES2
1175+
# and AES. To create a PKCS12 keystore which they can load, set the system
1176+
# property "keystore.pkcs12.legacy" which overrides the values of the properties
1177+
# defined below with legacy algorithms. Setting this system property (which can
1178+
# only be enabled and has no value) is equivalent to
1179+
#
1180+
# -Dkeystore.pkcs12.certProtectionAlgorithm=PBEWithSHA1AndRC2_40
1181+
# -Dkeystore.pkcs12.keyProtectionAlgorithm=PBEWithSHA1AndDESede
1182+
# -Dkeystore.pkcs12.macAlgorithm=HmacPBESHA1
1183+
# -Dkeystore.pkcs12.certPbeIterationCount=50000
1184+
# -Dkeystore.pkcs12.keyPbeIterationCount=50000
1185+
# -Dkeystore.pkcs12.macIterationCount=100000
1186+
#
1187+
# Also, you can downgrade an existing PKCS12 keystore created with stronger
1188+
# algorithms to legacy algorithms with
1189+
#
1190+
# keytool -J-Dkeystore.pkcs12.legacy -importkeystore -srckeystore ks -destkeystore ks
1191+
#
1192+
# This system property should be used at your own risk.
11731193
#
11741194
# Note: These properties are currently used by the JDK Reference implementation.
11751195
# They are not guaranteed to be examined and used by other implementations.

0 commit comments

Comments
 (0)