mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Lazy load crypto
The whole program is being slowed down by the large CA string in crypto. Why?
This commit is contained in:
1 parent
afce4c3ae8
commit
d044e2de07
1 file changed
+1
-1
+1
-1
@@ -1,7 +1,6 @@
|
||||
var sys = require("sys");
|
||||
var fs = require("fs");
|
||||
var events = require("events");
|
||||
var crypto= require("crypto");
|
||||
var dns = require('dns');
|
||||
|
||||
var kMinPoolSpace = 128;
|
||||
@@ -422,6 +421,7 @@ Stream.prototype.setSecure = function(credentials) {
|
||||
if (!have_crypto) {
|
||||
throw new Error('node.js not compiled with openssl crypto support.');
|
||||
}
|
||||
var crypto= require("crypto");
|
||||
this.secure = true;
|
||||
this.secureEstablished = false;
|
||||
// If no credentials given, create a new one for just this Stream
|
||||
|
||||
Reference in new issue
Block a user