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 @@ -569,11 +569,17 @@ private static void setProperties(Properties props) {
569
569
propsMapping .put ("jdk.tls.legacyAlgorithms" , restricts .jdkTlsLegacyAlgorithms );
570
570
propsMapping .put ("jdk.certpath.disabledAlgorithms" , restricts .jdkCertpathDisabledAlgorithms );
571
571
propsMapping .put ("jdk.security.legacyAlgorithms" , restricts .jdkSecurityLegacyAlgorithms );
572
- String fipsMode = System .getProperty ("com.ibm.fips.mode" );
573
- if (fipsMode == null ) {
574
- System .setProperty ("com.ibm.fips.mode" , restricts .jdkFipsMode );
575
- } else if (!fipsMode .equals (restricts .jdkFipsMode )) {
576
- printStackTraceAndExit ("Property com.ibm.fips.mode is incompatible with semeru.customprofile and semeru.fips properties" );
572
+
573
+ if (restricts .descIsFIPS ) {
574
+ if (restricts .jdkFipsMode == null ) {
575
+ printStackTraceAndExit (profileID + ".fips.mode property is not set in FIPS profile" );
576
+ }
577
+ String fipsMode = System .getProperty ("com.ibm.fips.mode" );
578
+ if (fipsMode == null ) {
579
+ System .setProperty ("com.ibm.fips.mode" , restricts .jdkFipsMode );
580
+ } else if (!fipsMode .equals (restricts .jdkFipsMode )) {
581
+ printStackTraceAndExit ("Property com.ibm.fips.mode is incompatible with semeru.customprofile and semeru.fips properties" );
582
+ }
577
583
}
578
584
579
585
if (userEnabledFIPS && !allowSetProperties ) {
You can’t perform that action at this time.
0 commit comments