From f429fe1b88db3463957058ec8975d3365fc3fefa Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 8 Mar 2016 15:31:31 -0800 Subject: 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 Reviewed-By: Ben Noordhuis --- lib/https.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/https.js') 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'); -- cgit v1.2.3