Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
KostasTsiounis committed Apr 16, 2024
1 parent ff115c3 commit 4a5675c
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public String[] run() {
isFIPSSupported = isNSSSupported;

userEnabledFIPS = Boolean.parseBoolean(props[0]);
allowSetSecurityProps = Boolean.parseBoolean(props[4]);
allowSetProperties = Boolean.parseBoolean(props[4]);

if (userEnabledFIPS) {
if (isFIPSSupported) {
Expand Down Expand Up @@ -393,7 +393,7 @@ private static void checkFIPSCompatibility(Properties props) {
*/
public static void checkSetSecurityProperty(String key) {
if (debug != null) {
debug.println("RestrictedSecurity: Checking whether security property '"
debug.println("RestrictedSecurity: Checking whether property '"
+ key + "' can be set.");
}

Expand All @@ -403,10 +403,9 @@ public static void checkSetSecurityProperty(String key) {
*
* Allow any change, if the 'semeru.fips.allowsetproperties' flag is set to true.
*/
if (userEnabledFIPS && !allowSetSecurityProps && unmodifiableProperties.contains(key)) {
if (unmodifiableProperties.contains(key)) {
if (debug != null) {
debug.println("RestrictedSecurity: Property '"
+ key + "' cannot be set.");
debug.println("RestrictedSecurity: Property '" + key + "' cannot be set.");
debug.println("If you want to override the check and allow all security"
+ "properties to be set, use '-Dsemeru.fips.allowsetproperties=true'.");
debug.println("BEWARE: You might not be FIPS compliant if you select to override!");
Expand Down

0 comments on commit 4a5675c

Please sign in to comment.