|
|
140246 |
diff -r 6efbd7b35a10 src/share/classes/java/security/SystemConfigurator.java
|
|
|
140246 |
--- openjdk.orig/src/java.base/share/classes/java/security/SystemConfigurator.java Thu Jan 23 18:22:31 2020 -0300
|
|
|
140246 |
+++ openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java Mon Mar 02 19:20:17 2020 -0300
|
|
|
140246 |
@@ -123,6 +123,33 @@
|
|
|
140246 |
}
|
|
|
140246 |
props.put(fipsProviderKey, fipsProviderValue);
|
|
|
140246 |
}
|
|
|
140246 |
+ // Add other security properties
|
|
|
140246 |
+ String keystoreTypeValue = (String) props.get("fips.keystore.type");
|
|
|
140246 |
+ if (keystoreTypeValue != null) {
|
|
|
140246 |
+ String nonFipsKeystoreType = props.getProperty("keystore.type");
|
|
|
140246 |
+ props.put("keystore.type", keystoreTypeValue);
|
|
|
140246 |
+ if (keystoreTypeValue.equals("PKCS11")) {
|
|
|
140246 |
+ // If keystore.type is PKCS11, javax.net.ssl.keyStore
|
|
|
140246 |
+ // must be "NONE". See JDK-8238264.
|
|
|
140246 |
+ System.setProperty("javax.net.ssl.keyStore", "NONE");
|
|
|
140246 |
+ }
|
|
|
140246 |
+ if (System.getProperty("javax.net.ssl.trustStoreType") == null) {
|
|
|
140246 |
+ // If no trustStoreType has been set, use the
|
|
|
140246 |
+ // previous keystore.type under FIPS mode. In
|
|
|
140246 |
+ // a default configuration, the Trust Store will
|
|
|
140246 |
+ // be 'cacerts' (JKS type).
|
|
|
140246 |
+ System.setProperty("javax.net.ssl.trustStoreType",
|
|
|
140246 |
+ nonFipsKeystoreType);
|
|
|
140246 |
+ }
|
|
|
140246 |
+ if (sdebug != null) {
|
|
|
140246 |
+ sdebug.println("FIPS mode default keystore.type = " +
|
|
|
140246 |
+ keystoreTypeValue);
|
|
|
140246 |
+ sdebug.println("FIPS mode javax.net.ssl.keyStore = " +
|
|
|
140246 |
+ System.getProperty("javax.net.ssl.keyStore", ""));
|
|
|
140246 |
+ sdebug.println("FIPS mode javax.net.ssl.trustStoreType = " +
|
|
|
140246 |
+ System.getProperty("javax.net.ssl.trustStoreType", ""));
|
|
|
140246 |
+ }
|
|
|
140246 |
+ }
|
|
|
140246 |
loadedProps = true;
|
|
|
140246 |
}
|
|
|
140246 |
} catch (Exception e) {
|
|
|
140246 |
diff -r 6efbd7b35a10 src/share/lib/security/java.security-linux
|
|
|
140246 |
--- openjdk.orig/src/java.base/share/conf/security/java.security Thu Jan 23 18:22:31 2020 -0300
|
|
|
140246 |
+++ openjdk/src/java.base/share/conf/security/java.security Mon Mar 02 19:20:17 2020 -0300
|
|
|
140246 |
@@ -299,6 +299,11 @@
|
|
|
140246 |
keystore.type=pkcs12
|
|
|
140246 |
|
|
|
140246 |
#
|
|
|
140246 |
+# Default keystore type used when global crypto-policies are set to FIPS.
|
|
|
140246 |
+#
|
|
|
140246 |
+fips.keystore.type=PKCS11
|
|
|
140246 |
+
|
|
|
140246 |
+#
|
|
|
140246 |
# Controls compatibility mode for JKS and PKCS12 keystore types.
|
|
|
140246 |
#
|
|
|
140246 |
# When set to 'true', both JKS and PKCS12 keystore types support loading
|