Browse Source

Remove should_verify from C++ - to handle in JS land

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
127f17a0ea
  1. 7
      src/node_crypto.cc
  2. 1
      src/node_crypto.h

7
src/node_crypto.cc

@ -378,7 +378,6 @@ Handle<Value> SecureStream::New(const Arguments& args) {
SecureContext *sc = ObjectWrap::Unwrap<SecureContext>(args[0]->ToObject());
bool is_server = args[1]->BooleanValue();
bool should_verify = args[2]->BooleanValue();
p->ssl_ = SSL_new(sc->ctx_);
p->bio_read_ = BIO_new(BIO_s_mem());
@ -390,9 +389,8 @@ Handle<Value> SecureStream::New(const Arguments& args) {
SSL_set_mode(p->ssl_, mode | SSL_MODE_RELEASE_BUFFERS);
#endif
if ((p->should_verify_ = should_verify)) {
// Always allow a connection. We'll reject in javascript.
SSL_set_verify(p->ssl_, SSL_VERIFY_PEER, VerifyCallback);
}
if ((p->is_server_ = is_server)) {
SSL_set_accept_state(p->ssl_);
@ -722,8 +720,7 @@ Handle<Value> SecureStream::VerifyError(const Arguments& args) {
SecureStream *ss = ObjectWrap::Unwrap<SecureStream>(args.Holder());
if (ss->ssl_ == NULL) return False();
if (!ss->should_verify_) return False();
if (ss->ssl_ == NULL) return Null();
#if 0
// Why?

1
src/node_crypto.h

@ -89,7 +89,6 @@ class SecureStream : ObjectWrap {
BIO *bio_write_;
SSL *ssl_;
bool is_server_; /* coverity[member_decl] */
bool should_verify_; /* coverity[member_decl] */
};
void InitCrypto(v8::Handle<v8::Object> target);

Loading…
Cancel
Save