Browse Source

crypto: fix a couple of VC++ warnings

Signed-off-by: Fedor Indutny <fedor@indutny.com>
v0.11.13-release
Rasmus Christian Pedersen 11 years ago
committed by Fedor Indutny
parent
commit
d13e0297c3
  1. 4
      src/node_crypto.cc
  2. 2
      src/node_crypto_clienthello.cc
  3. 2
      src/tcp_wrap.cc

4
src/node_crypto.cc

@ -761,7 +761,7 @@ void SecureContext::SetOptions(const FunctionCallbackInfo<Value>& args) {
return sc->env()->ThrowTypeError("Bad parameter");
}
SSL_CTX_set_options(sc->ctx_, args[0]->IntegerValue());
SSL_CTX_set_options(sc->ctx_, static_cast<long>(args[0]->IntegerValue()));
}
@ -4516,7 +4516,7 @@ void Certificate::VerifySpkac(const FunctionCallbackInfo<Value>& args) {
char* data = Buffer::Data(args[0]);
assert(data != NULL);
i = certificate->VerifySpkac(data, length) > 0;
i = certificate->VerifySpkac(data, length);
args.GetReturnValue().Set(i);
}

2
src/node_crypto_clienthello.cc

@ -125,7 +125,7 @@ void ClientHelloParser::ParseHeader(const uint8_t* data, size_t avail) {
hello.has_ticket_ = tls_ticket_ != NULL && tls_ticket_size_ != 0;
hello.ocsp_request_ = ocsp_request_;
hello.servername_ = servername_;
hello.servername_size_ = servername_size_;
hello.servername_size_ = static_cast<uint8_t>(servername_size_);
onhello_cb_(cb_arg_, hello);
}

2
src/tcp_wrap.cc

@ -246,7 +246,7 @@ void TCPWrap::Open(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
HandleScope scope(env->isolate());
TCPWrap* wrap = Unwrap<TCPWrap>(args.Holder());
int fd = args[0]->IntegerValue();
int fd = static_cast<int>(args[0]->IntegerValue());
uv_tcp_open(&wrap->handle_, fd);
}

Loading…
Cancel
Save