Skip to content

Commit

Permalink
crypto: add crypto/keys to cannotUseCache
Browse files Browse the repository at this point in the history
Currently when configuring --without-ssl test-code-cache.js will fail
with the following error:
internal/bootstrap/loaders.js:151
      mod = bindingObj[module] = getInternalBinding(module);
                                 ^

Error: No such module: crypto
    at internalBinding (internal/bootstrap/loaders.js:151:34)
    at internal/crypto/keys.js:14:5
    at NativeModule.compile (internal/bootstrap/loaders.js:342:5)
    at Function.NativeModule.require (internal/bootstrap/loaders.js:213:16)
    at Function.Module._load (internal/modules/cjs/loader.js:539:25)
    at Module.require (internal/modules/cjs/loader.js:654:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/node/test/code-cache/test-code-cache.js:31:3)
    at Module._compile (internal/modules/cjs/loader.js:718:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:729:10)

This commit adds internal/crypto/keys to the cannotUseCache array if
compiled without crypto support.

PR-URL: #25237
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
  • Loading branch information
danbev authored and BethGriggs committed Apr 28, 2019
1 parent 6ab84e3 commit 83b0ba4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/internal/bootstrap/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ if (!process.versions.openssl) {
'internal/crypto/diffiehellman',
'internal/crypto/hash',
'internal/crypto/keygen',
'internal/crypto/keys',
'internal/crypto/pbkdf2',
'internal/crypto/random',
'internal/crypto/scrypt',
Expand Down

0 comments on commit 83b0ba4

Please sign in to comment.