Skip to content

Commit 7e7266a

Browse files
committed
build: introduce --openssl-is-fips flag
This commit introduces a new configuration flag named --openssl-is-fips which is intended to be used when linking against an OpenSSL library that is FIPS compatible. The motivation for this is that Red Hat Enterprise Linux 8 (RHEL8) comes with OpenSSL 1.1.1 and includes FIPS support, and we would like to be able to dynamically link against this version and also have FIPS features enabled in node, like would be done when statically linking and using the --openssl-fips flag. The suggestion here is to introduce a new flag: $ ./configure --help ... --openssl-is-fips specifies that the shared OpenSSL version is FIPS compatible This flag could be used in combination with the shared-openssl flag: $ ./configure --shared-openssl ---openssl-is-fips This will enable FIPS support in node and the runtime flags will be availalbe to enable FIPS (--enable-fips, --force-fips). PR-URL: #25412 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent b7bbd87 commit 7e7266a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

configure.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@
173173
dest='openssl_fips',
174174
help='Build OpenSSL using FIPS canister .o file in supplied folder')
175175

176+
parser.add_option('--openssl-is-fips',
177+
action='store_true',
178+
dest='openssl_is_fips',
179+
help='specifies that the OpenSSL library is FIPS compatible')
180+
176181
parser.add_option('--openssl-use-def-ca-store',
177182
action='store_true',
178183
dest='use_openssl_ca_store',
@@ -1187,6 +1192,7 @@ def configure_openssl(o):
11871192
variables = o['variables']
11881193
variables['node_use_openssl'] = b(not options.without_ssl)
11891194
variables['node_shared_openssl'] = b(options.shared_openssl)
1195+
variables['openssl_is_fips'] = b(options.openssl_is_fips)
11901196
variables['openssl_fips'] = ''
11911197

11921198
if options.openssl_no_asm:

node.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
[ 'node_use_openssl=="true"', {
316316
'defines': [ 'HAVE_OPENSSL=1' ],
317317
'conditions': [
318-
['openssl_fips != ""', {
318+
['openssl_fips != "" or openssl_is_fips=="true"', {
319319
'defines': [ 'NODE_FIPS_MODE' ],
320320
}],
321321
[ 'node_shared_openssl=="false"', {

0 commit comments

Comments
 (0)