Skip to content

Commit

Permalink
lib: add crypto dependant modules cannotUseCache
Browse files Browse the repository at this point in the history
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: nodejs#24100
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
  • Loading branch information
danbev authored and kiyomizumia committed Nov 15, 2018
1 parent 8590b73 commit e6ae541
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/internal/bootstrap/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@ if (process.config.variables.v8_enable_inspector !== 1) {
if (!hasTracing) {
cannotUseCache.push('trace_events');
}
if (!process.versions.openssl) {
cannotUseCache.push('crypto');
cannotUseCache.push('https');
cannotUseCache.push('http2');
cannotUseCache.push('tls');
cannotUseCache.push('_tls_common');
cannotUseCache.push('_tls_wrap');
cannotUseCache.push('internal/crypto/certificate');
cannotUseCache.push('internal/crypto/cipher');
cannotUseCache.push('internal/crypto/diffiehellman');
cannotUseCache.push('internal/crypto/hash');
cannotUseCache.push('internal/crypto/keygen');
cannotUseCache.push('internal/crypto/pbkdf2');
cannotUseCache.push('internal/crypto/random');
cannotUseCache.push('internal/crypto/scrypt');
cannotUseCache.push('internal/crypto/sig');
cannotUseCache.push('internal/crypto/util');
cannotUseCache.push('internal/http2/core');
cannotUseCache.push('internal/http2/compat');
cannotUseCache.push('internal/streams/lazy_transform');
}

module.exports = {
cachableBuiltins: Object.keys(NativeModule._source).filter(
Expand Down

0 comments on commit e6ae541

Please sign in to comment.