From 862427306bb0a259317b2941f2744a4532d5855c Mon Sep 17 00:00:00 2001 From: SHASHIKANTH THAMBRAHALLI Date: Wed, 25 Jan 2023 15:56:07 +0530 Subject: [PATCH] Srt 1928 fipsbugfix (#373) * FIPS message bug fix * FIPS message bug fix --- internal/fips/fips.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/internal/fips/fips.go b/internal/fips/fips.go index ef118f0..2ae0d5f 100644 --- a/internal/fips/fips.go +++ b/internal/fips/fips.go @@ -60,11 +60,15 @@ func ProcessFIPSType(logs *logger.Logger) { if strings.EqualFold(fipsOverride, "false") || strings.EqualFold(fipsOverride, "0") { FIPSEnabledType = FIPS_ENABLED_OFF } else if strings.EqualFold(fipsOverride, "true") || strings.EqualFold(fipsOverride, "1") { - // This is the case where OS is not FIPS compliant but we have been asked to run MQ - // queue manager, web server in FIPS mode. This case can be used when running docker tests. - FIPSEnabledType = FIPS_ENABLED_ENV_VAR + // This is the case where OS may or may not be FIPS compliant but we have been asked + // to run MQ queue manager, web server and Native HA in FIPS mode. This case can also + // be used when running docker tests. If FIPS is enabled on host, then don't modify + // the original value. + if FIPSEnabledType != FIPS_ENABLED_PLATFORM { + FIPSEnabledType = FIPS_ENABLED_ENV_VAR + } } else if strings.EqualFold(fipsOverride, "auto") { - // This is the default case. Leave it to the OS default as determine above + // This is the default case. Leave it to the OS default as determined above. } else { // We don't recognise the value specified. Log a warning and carry on. if logs != nil {