@@ -217,7 +217,7 @@ Handle<Value> SecureContext::Init(const Arguments& args) {
217217 SSL_CTX_sess_set_new_cb (sc->ctx_ , NewSessionCallback);
218218
219219 sc->ca_store_ = NULL ;
220- return True ();
220+ return True (node_isolate );
221221}
222222
223223
@@ -333,7 +333,7 @@ Handle<Value> SecureContext::SetKey(const Arguments& args) {
333333 }
334334
335335 BIO *bio = LoadBIO (args[0 ]);
336- if (!bio) return False ();
336+ if (!bio) return False (node_isolate );
337337
338338 String::Utf8Value passphrase (args[1 ]);
339339
@@ -356,7 +356,7 @@ Handle<Value> SecureContext::SetKey(const Arguments& args) {
356356 EVP_PKEY_free (key);
357357 BIO_free (bio);
358358
359- return True ();
359+ return True (node_isolate );
360360}
361361
362362
@@ -437,7 +437,7 @@ Handle<Value> SecureContext::SetCert(const Arguments& args) {
437437 }
438438
439439 BIO * bio = LoadBIO (args[0 ]);
440- if (!bio) return False ();
440+ if (!bio) return False (node_isolate );
441441
442442 int rv = SSL_CTX_use_certificate_chain (sc->ctx_ , bio);
443443
@@ -454,7 +454,7 @@ Handle<Value> SecureContext::SetCert(const Arguments& args) {
454454 return ThrowException (Exception::Error (String::New (string)));
455455 }
456456
457- return True ();
457+ return True (node_isolate );
458458}
459459
460460
@@ -474,7 +474,7 @@ Handle<Value> SecureContext::AddCACert(const Arguments& args) {
474474 }
475475
476476 X509 * x509 = LoadX509 (args[0 ]);
477- if (!x509) return False ();
477+ if (!x509) return False (node_isolate );
478478
479479 X509_STORE_add_cert (sc->ca_store_ , x509);
480480 SSL_CTX_add_client_CA (sc->ctx_ , x509);
@@ -485,7 +485,7 @@ Handle<Value> SecureContext::AddCACert(const Arguments& args) {
485485 SSL_CTX_set_cert_store (sc->ctx_ , sc->ca_store_ );
486486 }
487487
488- return True ();
488+ return True (node_isolate );
489489}
490490
491491
@@ -499,13 +499,13 @@ Handle<Value> SecureContext::AddCRL(const Arguments& args) {
499499 }
500500
501501 BIO *bio = LoadBIO (args[0 ]);
502- if (!bio) return False ();
502+ if (!bio) return False (node_isolate );
503503
504504 X509_CRL *x509 = PEM_read_bio_X509_CRL (bio, NULL , NULL , NULL );
505505
506506 if (x509 == NULL ) {
507507 BIO_free (bio);
508- return False ();
508+ return False (node_isolate );
509509 }
510510
511511 X509_STORE_add_crl (sc->ca_store_ , x509);
@@ -516,7 +516,7 @@ Handle<Value> SecureContext::AddCRL(const Arguments& args) {
516516 BIO_free (bio);
517517 X509_CRL_free (x509);
518518
519- return True ();
519+ return True (node_isolate );
520520}
521521
522522
@@ -536,14 +536,14 @@ Handle<Value> SecureContext::AddRootCerts(const Arguments& args) {
536536
537537 if (!BIO_write (bp, root_certs[i], strlen (root_certs[i]))) {
538538 BIO_free (bp);
539- return False ();
539+ return False (node_isolate );
540540 }
541541
542542 X509 *x509 = PEM_read_bio_X509 (bp, NULL , NULL , NULL );
543543
544544 if (x509 == NULL ) {
545545 BIO_free (bp);
546- return False ();
546+ return False (node_isolate );
547547 }
548548
549549 X509_STORE_add_cert (root_cert_store, x509);
@@ -556,7 +556,7 @@ Handle<Value> SecureContext::AddRootCerts(const Arguments& args) {
556556 sc->ca_store_ = root_cert_store;
557557 SSL_CTX_set_cert_store (sc->ctx_ , sc->ca_store_ );
558558
559- return True ();
559+ return True (node_isolate );
560560}
561561
562562
@@ -572,7 +572,7 @@ Handle<Value> SecureContext::SetCiphers(const Arguments& args) {
572572 String::Utf8Value ciphers (args[0 ]);
573573 SSL_CTX_set_cipher_list (sc->ctx_ , *ciphers);
574574
575- return True ();
575+ return True (node_isolate );
576576}
577577
578578Handle<Value> SecureContext::SetOptions (const Arguments& args) {
@@ -586,7 +586,7 @@ Handle<Value> SecureContext::SetOptions(const Arguments& args) {
586586
587587 SSL_CTX_set_options (sc->ctx_ , args[0 ]->IntegerValue ());
588588
589- return True ();
589+ return True (node_isolate );
590590}
591591
592592Handle<Value> SecureContext::SetSessionIdContext (const Arguments& args) {
@@ -618,14 +618,14 @@ Handle<Value> SecureContext::SetSessionIdContext(const Arguments& args) {
618618 return ThrowException (Exception::TypeError (message));
619619 }
620620
621- return True ();
621+ return True (node_isolate );
622622}
623623
624624Handle<Value> SecureContext::Close (const Arguments& args) {
625625 HandleScope scope;
626626 SecureContext *sc = ObjectWrap::Unwrap<SecureContext>(args.Holder ());
627627 sc->FreeCTXMem ();
628- return False ();
628+ return False (node_isolate );
629629}
630630
631631// Takes .pfx or .p12 and password in string or buffer format
@@ -702,7 +702,7 @@ Handle<Value> SecureContext::LoadPKCS12(const Arguments& args) {
702702 return ThrowException (Exception::Error (String::New (str)));
703703 }
704704
705- return True ();
705+ return True (node_isolate );
706706}
707707
708708
@@ -948,11 +948,11 @@ void Connection::SetShutdownFlags() {
948948 int flags = SSL_get_shutdown (ssl_);
949949
950950 if (flags & SSL_SENT_SHUTDOWN ) {
951- handle_->Set (String::New (" sentShutdown" ), True ());
951+ handle_->Set (String::New (" sentShutdown" ), True (node_isolate ));
952952 }
953953
954954 if (flags & SSL_RECEIVED_SHUTDOWN ) {
955- handle_->Set (String::New (" receivedShutdown" ), True ());
955+ handle_->Set (String::New (" receivedShutdown" ), True (node_isolate ));
956956 }
957957}
958958
@@ -1082,7 +1082,7 @@ int Connection::SelectNextProtoCallback_(SSL *s,
10821082 *outlen = 8 ;
10831083
10841084 // set status unsupported
1085- p->selectedNPNProto_ = Persistent<Value>::New (False ());
1085+ p->selectedNPNProto_ = Persistent<Value>::New (False (node_isolate ));
10861086
10871087 return SSL_TLSEXT_ERR_OK ;
10881088 }
@@ -1103,7 +1103,7 @@ int Connection::SelectNextProtoCallback_(SSL *s,
11031103 ));
11041104 break ;
11051105 case OPENSSL_NPN_NO_OVERLAP :
1106- p->selectedNPNProto_ = Persistent<Value>::New (False ());
1106+ p->selectedNPNProto_ = Persistent<Value>::New (False (node_isolate ));
11071107 break ;
11081108 default :
11091109 break ;
@@ -1660,7 +1660,7 @@ Handle<Value> Connection::SetSession(const Arguments& args) {
16601660 return ThrowException (Exception::Error (eStr));
16611661 }
16621662
1663- return True ();
1663+ return True (node_isolate );
16641664}
16651665
16661666Handle<Value> Connection::LoadSession (const Arguments& args) {
@@ -1684,16 +1684,19 @@ Handle<Value> Connection::LoadSession(const Arguments& args) {
16841684
16851685 ss->hello_parser_ .Finish ();
16861686
1687- return True ();
1687+ return True (node_isolate );
16881688}
16891689
16901690Handle<Value> Connection::IsSessionReused (const Arguments& args) {
16911691 HandleScope scope;
16921692
16931693 Connection *ss = Connection::Unwrap (args);
16941694
1695- if (ss->ssl_ == NULL ) return False ();
1696- return SSL_session_reused (ss->ssl_ ) ? True () : False ();
1695+ if (ss->ssl_ == NULL || SSL_session_reused (ss->ssl_ ) == false ) {
1696+ return False (node_isolate);
1697+ }
1698+
1699+ return True (node_isolate);
16971700}
16981701
16991702
@@ -1724,7 +1727,7 @@ Handle<Value> Connection::Shutdown(const Arguments& args) {
17241727
17251728 Connection *ss = Connection::Unwrap (args);
17261729
1727- if (ss->ssl_ == NULL ) return False ();
1730+ if (ss->ssl_ == NULL ) return False (node_isolate );
17281731 int rv = SSL_shutdown (ss->ssl_ );
17291732 ss->HandleSSLError (" SSL_shutdown" , rv, kZeroIsNotAnError );
17301733 ss->SetShutdownFlags ();
@@ -1738,12 +1741,12 @@ Handle<Value> Connection::ReceivedShutdown(const Arguments& args) {
17381741
17391742 Connection *ss = Connection::Unwrap (args);
17401743
1741- if (ss->ssl_ == NULL ) return False ();
1744+ if (ss->ssl_ == NULL ) return False (node_isolate );
17421745 int r = SSL_get_shutdown (ss->ssl_ );
17431746
1744- if (r & SSL_RECEIVED_SHUTDOWN ) return True ();
1747+ if (r & SSL_RECEIVED_SHUTDOWN ) return True (node_isolate );
17451748
1746- return False ();
1749+ return False (node_isolate );
17471750}
17481751
17491752
@@ -1752,8 +1755,11 @@ Handle<Value> Connection::IsInitFinished(const Arguments& args) {
17521755
17531756 Connection *ss = Connection::Unwrap (args);
17541757
1755- if (ss->ssl_ == NULL ) return False ();
1756- return SSL_is_init_finished (ss->ssl_ ) ? True () : False ();
1758+ if (ss->ssl_ == NULL || SSL_is_init_finished (ss->ssl_ ) == false ) {
1759+ return False (node_isolate);
1760+ }
1761+
1762+ return True (node_isolate);
17571763}
17581764
17591765
@@ -1929,7 +1935,7 @@ Handle<Value> Connection::Close(const Arguments& args) {
19291935 SSL_free (ss->ssl_ );
19301936 ss->ssl_ = NULL ;
19311937 }
1932- return True ();
1938+ return True (node_isolate );
19331939}
19341940
19351941#ifdef OPENSSL_NPN_NEGOTIATED
@@ -1945,7 +1951,7 @@ Handle<Value> Connection::GetNegotiatedProto(const Arguments& args) {
19451951 SSL_get0_next_proto_negotiated (ss->ssl_ , &npn_proto, &npn_proto_len);
19461952
19471953 if (!npn_proto) {
1948- return False ();
1954+ return False (node_isolate );
19491955 }
19501956
19511957 return String::New ((const char *) npn_proto, npn_proto_len);
@@ -1970,7 +1976,7 @@ Handle<Value> Connection::SetNPNProtocols(const Arguments& args) {
19701976 }
19711977 ss->npnProtos_ = Persistent<Object>::New (args[0 ]->ToObject ());
19721978
1973- return True ();
1979+ return True (node_isolate );
19741980};
19751981#endif
19761982
@@ -1983,7 +1989,7 @@ Handle<Value> Connection::GetServername(const Arguments& args) {
19831989 if (ss->is_server_ && !ss->servername_ .IsEmpty ()) {
19841990 return ss->servername_ ;
19851991 } else {
1986- return False ();
1992+ return False (node_isolate );
19871993 }
19881994}
19891995
@@ -2004,7 +2010,7 @@ Handle<Value> Connection::SetSNICallback(const Arguments& args) {
20042010 ss->sniObject_ = Persistent<Object>::New (Object::New ());
20052011 ss->sniObject_ ->Set (String::New (" onselect" ), args[0 ]);
20062012
2007- return True ();
2013+ return True (node_isolate );
20082014}
20092015#endif
20102016
0 commit comments