Remove should_verify from C++ - to handle in JS land
This commit is contained in:
parent
c5d32b3c64
commit
127f17a0ea
@ -378,7 +378,6 @@ Handle<Value> SecureStream::New(const Arguments& args) {
|
|||||||
SecureContext *sc = ObjectWrap::Unwrap<SecureContext>(args[0]->ToObject());
|
SecureContext *sc = ObjectWrap::Unwrap<SecureContext>(args[0]->ToObject());
|
||||||
|
|
||||||
bool is_server = args[1]->BooleanValue();
|
bool is_server = args[1]->BooleanValue();
|
||||||
bool should_verify = args[2]->BooleanValue();
|
|
||||||
|
|
||||||
p->ssl_ = SSL_new(sc->ctx_);
|
p->ssl_ = SSL_new(sc->ctx_);
|
||||||
p->bio_read_ = BIO_new(BIO_s_mem());
|
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);
|
SSL_set_mode(p->ssl_, mode | SSL_MODE_RELEASE_BUFFERS);
|
||||||
#endif
|
#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);
|
SSL_set_verify(p->ssl_, SSL_VERIFY_PEER, VerifyCallback);
|
||||||
}
|
|
||||||
|
|
||||||
if ((p->is_server_ = is_server)) {
|
if ((p->is_server_ = is_server)) {
|
||||||
SSL_set_accept_state(p->ssl_);
|
SSL_set_accept_state(p->ssl_);
|
||||||
@ -722,8 +720,7 @@ Handle<Value> SecureStream::VerifyError(const Arguments& args) {
|
|||||||
|
|
||||||
SecureStream *ss = ObjectWrap::Unwrap<SecureStream>(args.Holder());
|
SecureStream *ss = ObjectWrap::Unwrap<SecureStream>(args.Holder());
|
||||||
|
|
||||||
if (ss->ssl_ == NULL) return False();
|
if (ss->ssl_ == NULL) return Null();
|
||||||
if (!ss->should_verify_) return False();
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Why?
|
// Why?
|
||||||
|
@ -89,7 +89,6 @@ class SecureStream : ObjectWrap {
|
|||||||
BIO *bio_write_;
|
BIO *bio_write_;
|
||||||
SSL *ssl_;
|
SSL *ssl_;
|
||||||
bool is_server_; /* coverity[member_decl] */
|
bool is_server_; /* coverity[member_decl] */
|
||||||
bool should_verify_; /* coverity[member_decl] */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void InitCrypto(v8::Handle<v8::Object> target);
|
void InitCrypto(v8::Handle<v8::Object> target);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user