Skip to content

Commit

Permalink
Fix RSA key pairs generation in FIPS environment
Browse files Browse the repository at this point in the history
When FIPS is enabled and kay are not temporary then the sensitive flag
has to be true.

Flags are assigned only if not `NULL` so to enable the default values they generator is invoked with `NULL` value instead of `false` value which was assigned.
  • Loading branch information
fmarco76 committed Nov 9, 2023
1 parent 8e01622 commit cc3987c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ public static KeyPair generateRSAKeyPair(
return generateRSAKeyPair(
token,
keySize,
false,
false,
false,
null,
null,
null,
usages,
usagesMask);
}
Expand Down
12 changes: 6 additions & 6 deletions base/common/src/main/java/org/dogtagpki/nss/NSSDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,9 @@ public KeyPair createRSAKeyPair(
return CryptoUtil.generateRSAKeyPair(
token,
keySize,
false,
false,
false,
null,
null,
null,
usages,
usagesMask);
}
Expand All @@ -989,9 +989,9 @@ public KeyPair createRSAKeyPair(
return CryptoUtil.generateRSAKeyPair(
token,
keySize,
false,
false,
false,
null,
null,
null,
null,
null);
}
Expand Down

0 comments on commit cc3987c

Please sign in to comment.