Skip to content

Commit 1225a0a

Browse files
danbevBridgeAR
authored andcommitted
lib: add crypto dependant modules cannotUseCache
This commit adds JavaScript modules that depend on crypto to the cannotUseCache array. This is to avoid having them compiled when node has been configured --without-ssl which currently fails. PR-URL: #24100 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent 453c96e commit 1225a0a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

lib/internal/bootstrap/cache.js

+21
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,27 @@ if (process.config.variables.v8_enable_inspector !== 1) {
5252
if (!hasTracing) {
5353
cannotUseCache.push('trace_events');
5454
}
55+
if (!process.versions.openssl) {
56+
cannotUseCache.push('crypto');
57+
cannotUseCache.push('https');
58+
cannotUseCache.push('http2');
59+
cannotUseCache.push('tls');
60+
cannotUseCache.push('_tls_common');
61+
cannotUseCache.push('_tls_wrap');
62+
cannotUseCache.push('internal/crypto/certificate');
63+
cannotUseCache.push('internal/crypto/cipher');
64+
cannotUseCache.push('internal/crypto/diffiehellman');
65+
cannotUseCache.push('internal/crypto/hash');
66+
cannotUseCache.push('internal/crypto/keygen');
67+
cannotUseCache.push('internal/crypto/pbkdf2');
68+
cannotUseCache.push('internal/crypto/random');
69+
cannotUseCache.push('internal/crypto/scrypt');
70+
cannotUseCache.push('internal/crypto/sig');
71+
cannotUseCache.push('internal/crypto/util');
72+
cannotUseCache.push('internal/http2/core');
73+
cannotUseCache.push('internal/http2/compat');
74+
cannotUseCache.push('internal/streams/lazy_transform');
75+
}
5576

5677
module.exports = {
5778
cachableBuiltins: Object.keys(NativeModule._source).filter(

0 commit comments

Comments
 (0)