Skip to content

Commit 47d040d

Browse files
danbevaddaleax
authored andcommitted
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 0897504 commit 47d040d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

configure.py

+6
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',
@@ -1190,6 +1195,7 @@ def configure_openssl(o):
11901195
variables = o['variables']
11911196
variables['node_use_openssl'] = b(not options.without_ssl)
11921197
variables['node_shared_openssl'] = b(options.shared_openssl)
1198+
variables['openssl_is_fips'] = b(options.openssl_is_fips)
11931199
variables['openssl_fips'] = ''
11941200

11951201
if options.openssl_no_asm:

node.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
[ 'node_use_openssl=="true"', {
320320
'defines': [ 'HAVE_OPENSSL=1' ],
321321
'conditions': [
322-
['openssl_fips != ""', {
322+
['openssl_fips != "" or openssl_is_fips=="true"', {
323323
'defines': [ 'NODE_FIPS_MODE' ],
324324
}],
325325
[ 'node_shared_openssl=="false"', {

0 commit comments

Comments
 (0)