|
1 | 1 | 'use strict'; |
2 | 2 |
|
3 | 3 | const { types } = internalBinding('options'); |
| 4 | +const hasCrypto = Boolean(process.versions.openssl); |
4 | 5 |
|
5 | 6 | const typeLookup = []; |
6 | 7 | for (const key of Object.keys(types)) |
@@ -33,11 +34,6 @@ const envVars = new Map([ |
33 | 34 | 'certificate validation' }], |
34 | 35 | ['NODE_V8_COVERAGE', { helpText: 'directory to output v8 coverage JSON ' + |
35 | 36 | 'to' }], |
36 | | - ['OPENSSL_CONF', { helpText: 'load OpenSSL configuration from file' }], |
37 | | - ['SSL_CERT_DIR', { helpText: 'sets OpenSSL\'s directory of trusted ' + |
38 | | - 'certificates when used in conjunction with --use-openssl-ca' }], |
39 | | - ['SSL_CERT_FILE', { helpText: 'sets OpenSSL\'s trusted certificate file ' + |
40 | | - 'when used in conjunction with --use-openssl-ca' }], |
41 | 37 | ['UV_THREADPOOL_SIZE', { helpText: 'sets the number of threads used in ' + |
42 | 38 | 'libuv\'s threadpool' }] |
43 | 39 | ].concat(hasIntl ? [ |
@@ -46,6 +42,12 @@ const envVars = new Map([ |
46 | 42 | ] : []).concat(hasNodeOptions ? [ |
47 | 43 | ['NODE_OPTIONS', { helpText: 'set CLI options in the environment via a ' + |
48 | 44 | 'space-separated list' }] |
| 45 | +] : []).concat(hasCrypto ? [ |
| 46 | + ['OPENSSL_CONF', { helpText: 'load OpenSSL configuration from file' }], |
| 47 | + ['SSL_CERT_DIR', { helpText: 'sets OpenSSL\'s directory of trusted ' + |
| 48 | + 'certificates when used in conjunction with --use-openssl-ca' }], |
| 49 | + ['SSL_CERT_FILE', { helpText: 'sets OpenSSL\'s trusted certificate file ' + |
| 50 | + 'when used in conjunction with --use-openssl-ca' }], |
49 | 51 | ] : [])); |
50 | 52 |
|
51 | 53 |
|
|