File tree 3 files changed +26
-2
lines changed 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ file a new issue.
52
52
* [ Build with a specific ICU] ( #build-with-a-specific-icu )
53
53
* [ Unix/macOS] ( #unixmacos-3 )
54
54
* [ Windows] ( #windows-4 )
55
+ * [ Configuring OpenSSL config appname] ( #configure-openssl-appname )
55
56
* [ Building Node.js with FIPS-compliant OpenSSL] ( #building-nodejs-with-fips-compliant-openssl )
56
57
* [ Building Node.js with external core modules] ( #building-nodejs-with-external-core-modules )
57
58
* [ Unix/macOS] ( #unixmacos-4 )
@@ -768,6 +769,19 @@ as `deps/icu` (You'll have: `deps/icu/source/...`)
768
769
> .\v cbuild full-icu
769
770
```
770
771
772
+ ### Configure OpenSSL appname
773
+
774
+ Node.js can use an OpenSSL configuration file by specifying the environment
775
+ variable ` OPENSSL_CONF ` , or using the command line option ` --openssl-conf ` , and
776
+ if none of those are specified will default to reading the default OpenSSL
777
+ configuration file ` openssl.cnf ` . Node.js will only read a section that is by
778
+ default named ` nodejs_conf ` , but this name can be overridden using the following
779
+ configure option:
780
+
781
+ ``` console
782
+ $ ./configure --openssl-conf-name=< some_conf_name>
783
+ ```
784
+
771
785
## Building Node.js with FIPS-compliant OpenSSL
772
786
773
787
The current version of Node.js supports FIPS when statically and
Original file line number Diff line number Diff line change 181
181
"e.g. /root/x/y.js will be referenced via require('root/x/y'). "
182
182
"Can be used multiple times" )
183
183
184
+ parser .add_argument ("--openssl-conf-name" ,
185
+ action = "store" ,
186
+ dest = "openssl_conf_name" ,
187
+ default = 'nodejs_conf' ,
188
+ help = "The OpenSSL config appname (config section name) used by Node.js" )
189
+
184
190
parser .add_argument ('--openssl-default-cipher-list' ,
185
191
action = 'store' ,
186
192
dest = 'openssl_default_cipher_list' ,
@@ -1488,6 +1494,8 @@ def configure_openssl(o):
1488
1494
if options .openssl_no_asm :
1489
1495
variables ['openssl_no_asm' ] = 1
1490
1496
1497
+ o ['defines' ] += ['NODE_OPENSSL_CONF_NAME=' + options .openssl_conf_name ]
1498
+
1491
1499
if options .without_ssl :
1492
1500
def without_ssl_error (option ):
1493
1501
error ('--without-ssl is incompatible with %s' % option )
Original file line number Diff line number Diff line change @@ -162,6 +162,9 @@ PVOID old_vectored_exception_handler;
162
162
struct V8Platform v8_platform;
163
163
} // namespace per_process
164
164
165
+ // The section in the OpenSSL configuration file to be loaded.
166
+ const char * conf_section_name = STRINGIFY(NODE_OPENSSL_CONF_NAME);
167
+
165
168
#ifdef __POSIX__
166
169
void SignalExit (int signo, siginfo_t * info, void * ucontext) {
167
170
ResetStdio ();
@@ -1085,12 +1088,11 @@ InitializationResult InitializeOncePerProcess(
1085
1088
// return 0, leading to an endless loop and the node process will appear to
1086
1089
// hang/freeze.
1087
1090
1088
- // The section in the OpenSSL configuration file to be loaded.
1089
- const char * conf_section_name = " nodejs_conf" ;
1090
1091
// Passing NULL as the config file will allow the default openssl.cnf file
1091
1092
// to be loaded, but the default section in that file will not be used,
1092
1093
// instead only the section that matches the value of conf_section_name
1093
1094
// will be read from the default configuration file.
1095
+ // fprintf(stderr, "appanme: %s\n", conf_section_name);
1094
1096
const char * conf_file = nullptr ;
1095
1097
// Use OPENSSL_CONF environment variable is set.
1096
1098
std::string env_openssl_conf;
You can’t perform that action at this time.
0 commit comments