Skip to content

Commit

Permalink
Revert to using env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirov-dd committed Dec 16, 2024
1 parent 470bca7 commit e7d4f3c
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion datadog_checks_base/datadog_checks/base/checks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,31 @@ def __init__(self, *args, **kwargs):
self.__logs_enabled = None

if os.environ.get("GOFIPS", "0") == "1":
with open("/opt/datadog-agent/embedded/ssl/openssl_fips.cnf", "w") as f:
config = """
config_diagnostics = 1
openssl_conf = openssl_init
.include /opt/datadog-agent/embedded/ssl/fipsmodule.cnf
[openssl_init]
providers = provider_sect
alg_section = algorithm_sect
[provider_sect]
fips = fips_sect
base = base_sect
[base_sect]
activate = 1
[algorithm_sect]
default_properties = fips=yes
"""
f.write(config)

enable_fips(
path_to_openssl_conf="/opt/datadog-agent/embedded/ssl/openssl.cnf",
path_to_openssl_conf="/opt/datadog-agent/embedded/ssl/openssl_fips.cnf",
path_to_openssl_modules="/opt/datadog-agent/embedded/lib/ossl-modules",
)

Expand Down

0 comments on commit e7d4f3c

Please sign in to comment.