diff options
author | James M Snell <jasnell@gmail.com> | 2016-03-08 15:31:31 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-03-23 10:34:40 -0700 |
commit | f429fe1b88db3463957058ec8975d3365fc3fefa (patch) | |
tree | 86942a51c941785ed4f472e7ca85e1f01d64d640 /lib/https.js | |
parent | 0b3936b49f06743ea7aa48f4c03c99edf48afe80 (diff) | |
download | android-node-v8-f429fe1b88db3463957058ec8975d3365fc3fefa.tar.gz android-node-v8-f429fe1b88db3463957058ec8975d3365fc3fefa.tar.bz2 android-node-v8-f429fe1b88db3463957058ec8975d3365fc3fefa.zip |
crypto: fail early when loading crypto without openssl
Fail early in require('crypto'), require('tls'),
require('https'), etc when crypto is not available
(rather than depending on an internal try/catch).
Add documentation for detecting when crypto is not available.
PR-URL: https://github.com/nodejs/node/pull/5611
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/https.js')
-rw-r--r-- | lib/https.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/https.js b/lib/https.js index c1d1a51dab..b8969b6845 100644 --- a/lib/https.js +++ b/lib/https.js @@ -1,5 +1,7 @@ 'use strict'; +require('internal/util').assertCrypto(exports); + const tls = require('tls'); const url = require('url'); const http = require('http'); |