File tree 1 file changed +11
-5
lines changed
closed/src/java.base/share/classes/openj9/internal/security
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -571,11 +571,17 @@ private static void setProperties(Properties props) {
571
571
propsMapping .put ("jdk.tls.legacyAlgorithms" , restricts .jdkTlsLegacyAlgorithms );
572
572
propsMapping .put ("jdk.certpath.disabledAlgorithms" , restricts .jdkCertpathDisabledAlgorithms );
573
573
propsMapping .put ("jdk.security.legacyAlgorithms" , restricts .jdkSecurityLegacyAlgorithms );
574
- String fipsMode = System .getProperty ("com.ibm.fips.mode" );
575
- if (fipsMode == null ) {
576
- System .setProperty ("com.ibm.fips.mode" , restricts .jdkFipsMode );
577
- } else if (!fipsMode .equals (restricts .jdkFipsMode )) {
578
- printStackTraceAndExit ("Property com.ibm.fips.mode is incompatible with semeru.customprofile and semeru.fips properties" );
574
+
575
+ if (restricts .descIsFIPS ) {
576
+ if (restricts .jdkFipsMode == null ) {
577
+ printStackTraceAndExit (profileID + ".fips.mode property is not set in FIPS profile" );
578
+ }
579
+ String fipsMode = System .getProperty ("com.ibm.fips.mode" );
580
+ if (fipsMode == null ) {
581
+ System .setProperty ("com.ibm.fips.mode" , restricts .jdkFipsMode );
582
+ } else if (!fipsMode .equals (restricts .jdkFipsMode )) {
583
+ printStackTraceAndExit ("Property com.ibm.fips.mode is incompatible with semeru.customprofile and semeru.fips properties" );
584
+ }
579
585
}
580
586
581
587
if (userEnabledFIPS && !allowSetProperties ) {
You can’t perform that action at this time.
0 commit comments