Skip to content

Investigate OpenSSL FIPS configuration using openssl.cnf #28531

Closed
@danbev

Description

@danbev

This issue was discovered by dynamically linking to Red Hat's OpenSSL 1.1.1c (which has not yet been released). This might not be an issue for other platforms but we should still look into and verify that configuring FIPS is supported by adding this configuration option in openssl.cnf as discussed in #28507.

This issue is related to configuring OpenSSL FIPS support by using the OpenSSL configuration file:

$ openssl version -d
OPENSSLDIR: "/etc/pki/tls"

It should be possible to enable FIPS by setting fips_mode to true/yes in /etc/pki/tls/openssl.cnf:

openssl_conf = default_modules


[ default_modules ]
alg_section = evp_settings

[ evp_settings ]
fips_mode = true

Starting node with the above configuration:

$ OPENSSL_CONF=/etc/pki/tls/openssl.cnf ./node -p "require('crypto').getFips()"
openssl config failed: error:060B10A7:digital envelope routines:alg_module_init:fips mode not supported
0

Note that it is possible to enable fips using --enable-fips:

./node --enable-fips -p "require('crypto').getFips()"
1

Since OpenSSL in this case if modified to provide FIPS support and has not be released yet, I can't rule out that there is a bug/missing patch which is causing this.

I'm heading off on PTO tomorrow but I'll follow up on this when I get back in August.

Metadata

Metadata

Assignees

Labels

cryptoIssues and PRs related to the crypto subsystem.opensslIssues and PRs related to the OpenSSL dependency.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions