Lines Matching defs:args
475 void TLSWrap::Wrap(const FunctionCallbackInfo<Value>& args) {
476 Environment* env = Environment::GetCurrent(args);
478 CHECK_EQ(args.Length(), 4);
479 CHECK(args[0]->IsObject());
480 CHECK(args[1]->IsObject());
481 CHECK(args[2]->IsBoolean());
482 CHECK(args[3]->IsBoolean());
484 Local<Object> sc = args[1].As<Object>();
485 Kind kind = args[2]->IsTrue() ? Kind::kServer : Kind::kClient;
488 args[3]->IsTrue() ? UnderlyingStreamWriteStatus::kHasActive
491 StreamBase* stream = StreamBase::FromObject(args[0].As<Object>());
504 args.GetReturnValue().Set(res->object());
507 void TLSWrap::Receive(const FunctionCallbackInfo<Value>& args) {
509 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
511 ArrayBufferViewContents<char> buffer(args[0]);
529 void TLSWrap::Start(const FunctionCallbackInfo<Value>& args) {
531 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1156 void TLSWrap::SetVerifyMode(const FunctionCallbackInfo<Value>& args) {
1158 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1160 CHECK_EQ(args.Length(), 2);
1161 CHECK(args[0]->IsBoolean());
1162 CHECK(args[1]->IsBoolean());
1167 bool request_cert = args[0]->IsTrue();
1172 bool reject_unauthorized = args[1]->IsTrue();
1188 void TLSWrap::EnableSessionCallbacks(const FunctionCallbackInfo<Value>& args) {
1190 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1204 void TLSWrap::EnableKeylogCallback(const FunctionCallbackInfo<Value>& args) {
1206 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1221 void TLSWrap::EnableTrace(const FunctionCallbackInfo<Value>& args) {
1223 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1244 void TLSWrap::DestroySSL(const FunctionCallbackInfo<Value>& args) {
1246 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1273 void TLSWrap::EnableCertCb(const FunctionCallbackInfo<Value>& args) {
1275 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1290 void TLSWrap::EnableALPNCb(const FunctionCallbackInfo<Value>& args) {
1292 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1300 void TLSWrap::GetServername(const FunctionCallbackInfo<Value>& args) {
1301 Environment* env = Environment::GetCurrent(args);
1304 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1310 args.GetReturnValue().Set(OneByteString(env->isolate(), servername));
1312 args.GetReturnValue().Set(false);
1316 void TLSWrap::SetServername(const FunctionCallbackInfo<Value>& args) {
1317 Environment* env = Environment::GetCurrent(args);
1320 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1322 CHECK_EQ(args.Length(), 1);
1323 CHECK(args[0]->IsString());
1329 Utf8Value servername(env->isolate(), args[0].As<String>());
1383 void TLSWrap::SetPskIdentityHint(const FunctionCallbackInfo<Value>& args) {
1385 ASSIGN_OR_RETURN_UNWRAP(&p, args.Holder());
1391 CHECK(args[0]->IsString());
1392 Utf8Value hint(isolate, args[0].As<String>());
1400 void TLSWrap::EnablePskCallback(const FunctionCallbackInfo<Value>& args) {
1402 ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
1533 void TLSWrap::CertCbDone(const FunctionCallbackInfo<Value>& args) {
1534 Environment* env = Environment::GetCurrent(args);
1536 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1579 void TLSWrap::SetALPNProtocols(const FunctionCallbackInfo<Value>& args) {
1581 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1583 if (args.Length() < 1 || !Buffer::HasInstance(args[0]))
1586 ArrayBufferViewContents<uint8_t> protos(args[0].As<ArrayBufferView>());
1598 void TLSWrap::GetPeerCertificate(const FunctionCallbackInfo<Value>& args) {
1600 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1603 bool abbreviated = args.Length() < 1 || !args[0]->IsTrue();
1611 args.GetReturnValue().Set(ret);
1614 void TLSWrap::GetPeerX509Certificate(const FunctionCallbackInfo<Value>& args) {
1616 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1625 args.GetReturnValue().Set(ret);
1628 void TLSWrap::GetCertificate(const FunctionCallbackInfo<Value>& args) {
1630 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1635 args.GetReturnValue().Set(ret);
1638 void TLSWrap::GetX509Certificate(const FunctionCallbackInfo<Value>& args) {
1640 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1644 args.GetReturnValue().Set(ret);
1647 void TLSWrap::GetFinished(const FunctionCallbackInfo<Value>& args) {
1648 Environment* env = Environment::GetCurrent(args);
1651 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1675 args.GetReturnValue().Set(buffer);
1678 void TLSWrap::GetPeerFinished(const FunctionCallbackInfo<Value>& args) {
1679 Environment* env = Environment::GetCurrent(args);
1682 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1706 args.GetReturnValue().Set(buffer);
1709 void TLSWrap::GetSession(const FunctionCallbackInfo<Value>& args) {
1710 Environment* env = Environment::GetCurrent(args);
1713 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1735 args.GetReturnValue().Set(buffer);
1738 void TLSWrap::SetSession(const FunctionCallbackInfo<Value>& args) {
1739 Environment* env = Environment::GetCurrent(args);
1742 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1744 if (args.Length() < 1)
1747 THROW_AND_RETURN_IF_NOT_BUFFER(env, args[0], "Session");
1748 ArrayBufferViewContents<unsigned char> sbuf(args[0]);
1757 void TLSWrap::IsSessionReused(const FunctionCallbackInfo<Value>& args) {
1759 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1761 args.GetReturnValue().Set(yes);
1764 void TLSWrap::VerifyError(const FunctionCallbackInfo<Value>& args) {
1765 Environment* env = Environment::GetCurrent(args);
1767 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1778 return args.GetReturnValue().SetNull();
1789 args.GetReturnValue().Set(error);
1792 void TLSWrap::GetCipher(const FunctionCallbackInfo<Value>& args) {
1793 Environment* env = Environment::GetCurrent(args);
1795 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1796 args.GetReturnValue().Set(
1800 void TLSWrap::LoadSession(const FunctionCallbackInfo<Value>& args) {
1802 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1805 if (args.Length() >= 1 && Buffer::HasInstance(args[0])) {
1806 ArrayBufferViewContents<unsigned char> sbuf(args[0]);
1816 void TLSWrap::GetSharedSigalgs(const FunctionCallbackInfo<Value>& args) {
1817 Environment* env = Environment::GetCurrent(args);
1819 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1891 args.GetReturnValue().Set(
1895 void TLSWrap::ExportKeyingMaterial(const FunctionCallbackInfo<Value>& args) {
1896 CHECK(args[0]->IsInt32());
1897 CHECK(args[1]->IsString());
1899 Environment* env = Environment::GetCurrent(args);
1901 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1903 uint32_t olen = args[0].As<Uint32>()->Value();
1904 Utf8Value label(env->isolate(), args[1]);
1913 bool use_context = !args[2]->IsUndefined();
1915 context = ByteSource::FromBuffer(args[2]);
1935 args.GetReturnValue().Set(buffer);
1938 void TLSWrap::EndParser(const FunctionCallbackInfo<Value>& args) {
1940 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1944 void TLSWrap::Renegotiate(const FunctionCallbackInfo<Value>& args) {
1946 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1952 void TLSWrap::GetTLSTicket(const FunctionCallbackInfo<Value>& args) {
1954 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1966 args.GetReturnValue().Set(
1972 void TLSWrap::NewSessionDone(const FunctionCallbackInfo<Value>& args) {
1974 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1979 void TLSWrap::SetOCSPResponse(const FunctionCallbackInfo<Value>& args) {
1981 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1984 if (args.Length() < 1)
1987 THROW_AND_RETURN_IF_NOT_BUFFER(env, args[0], "OCSP response");
1989 w->ocsp_response_.Reset(args.GetIsolate(), args[0].As<ArrayBufferView>());
1992 void TLSWrap::RequestOCSP(const FunctionCallbackInfo<Value>& args) {
1994 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
1999 void TLSWrap::GetEphemeralKeyInfo(const FunctionCallbackInfo<Value>& args) {
2001 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
2002 Environment* env = Environment::GetCurrent(args);
2008 return args.GetReturnValue().SetNull();
2010 args.GetReturnValue().Set(GetEphemeralKey(env, w->ssl_)
2017 void TLSWrap::GetProtocol(const FunctionCallbackInfo<Value>& args) {
2018 Environment* env = Environment::GetCurrent(args);
2020 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
2021 args.GetReturnValue().Set(
2025 void TLSWrap::GetALPNNegotiatedProto(const FunctionCallbackInfo<Value>& args) {
2026 Environment* env = Environment::GetCurrent(args);
2028 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
2048 args.GetReturnValue().Set(result);
2052 const FunctionCallbackInfo<Value>& args) {
2054 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
2075 void TLSWrap::SetMaxSendFragment(const FunctionCallbackInfo<Value>& args) {
2076 CHECK(args.Length() >= 1 && args[0]->IsNumber());
2077 Environment* env = Environment::GetCurrent(args);
2079 ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
2082 args[0]->Int32Value(env->context()).FromJust());
2083 args.GetReturnValue().Set(rv);