Skip to content

Commit 1cd1956

Browse files
committed
Disable default GSKit FIPS mode when FIPS is not required
1 parent fa111db commit 1cd1956

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change log
22

3+
## 9.4.0.0-r3 (2024-07)
4+
5+
* Fix to diable FIPS mode for `runmqakm` key store generation, when FIPS is not enabled
6+
37
## 9.4.0.0 (2024-06)
48

59
* Updated to MQ version 9.4.0.0

internal/keystore/keystore.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,13 @@ func (ks *KeyStore) IsFIPSEnabled() bool {
245245
return ks.fipsEnabled
246246
}
247247

248-
// Returns -fips option if FIPS is enabled otherwise empty string. Return value is used
249-
// when running runmqakm/runmqckm commands.
248+
// getFipsEnabledFlag returns the appropriate flag for runmqakm/runmqckm commands
249+
// to enable or disable FIPS.
250250
func (ks *KeyStore) getFipsEnabledFlag() string {
251-
var fipsEnabled string
252-
253251
if ks.fipsEnabled {
254-
fipsEnabled = "-fips"
252+
return "-fips"
255253
} else {
256-
fipsEnabled = ""
254+
// In the GSKit command line, FIPS mode is enabled by default, so explicitly disable it
255+
return "-fips false"
257256
}
258-
259-
return fipsEnabled
260257
}

0 commit comments

Comments
 (0)