Skip to content

Commit

Permalink
Fix crypto statics initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
paddybyers committed Nov 18, 2011
1 parent 4424da3 commit 76bd523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static unsigned long crypto_id_cb(void) {

void SecureContext::Initialize(Handle<Object> target) {
HandleScope scope;
NODE_STATICS_NEW(node_crypto, CryptoStatics, statics);
CryptoStatics *statics = NODE_STATICS_GET(node_crypto, CryptoStatics);

Local<FunctionTemplate> t = FunctionTemplate::New(SecureContext::New);
statics->secure_context_constructor = Persistent<FunctionTemplate>::New(t);
Expand Down Expand Up @@ -4266,7 +4266,7 @@ Handle<Value> RandomBytes(const Arguments& args) {

void InitCrypto(Handle<Object> target) {
HandleScope scope;
CryptoStatics *statics = NODE_STATICS_GET(node_crypto, CryptoStatics);
NODE_STATICS_NEW(node_crypto, CryptoStatics, statics);

SSL_library_init();
OpenSSL_add_all_algorithms();
Expand Down

0 comments on commit 76bd523

Please sign in to comment.