diff options
author | Robert Newson <rnewson@apache.org> | 2020-06-05 12:40:08 +0100 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2020-06-05 13:35:20 +0100 |
commit | 10fae610f3463e215f37296acc40df1c62cbd8c4 (patch) | |
tree | 9f41fe167577f1be381b0452594c93e0b1a68866 | |
parent | ab93b155095643ab13f3779abc6c948fe273fe4b (diff) | |
download | couchdb-report-fips-feature.tar.gz |
Report if FIPS mode is enabledreport-fips-feature
This will only report "fips" in the welcome message if FIPS mode
was enabled at boot (i.e, in vm.args).
-rw-r--r-- | src/couch/src/couch_server.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl index b2f8fdead..6db3f7448 100644 --- a/src/couch/src/couch_server.erl +++ b/src/couch/src/couch_server.erl @@ -246,6 +246,16 @@ init([]) -> % Mark being able to receive documents with an _access property as a supported feature config:enable_feature('access-ready'), + % Mark if fips is enabled + case + erlang:function_exported(crypto, info_fips, 0) andalso + crypto:info_fips() == enabled of + true -> + config:enable_feature('fips'); + false -> + ok + end, + % read config and register for configuration changes % just stop if one of the config settings change. couch_server_sup |