Lines Matching refs:rv
260 SECStatus rv = SSL_PeerCertificateChain(nss_fd, NULL, &num_certs_); in PeerCertificateChain() local
261 DCHECK_EQ(rv, SECSuccess); in PeerCertificateChain()
265 rv = SSL_PeerCertificateChain(nss_fd, certs_, &num_certs_); in PeerCertificateChain()
266 DCHECK_EQ(rv, SECSuccess); in PeerCertificateChain()
363 SECStatus rv; in VerifyTXTRecords() local
367 rv = HASH_HashBuf(hash_algorithm, calculated_hash, in VerifyTXTRecords()
371 rv = HASH_HashBuf(hash_algorithm, calculated_hash, in VerifyTXTRecords()
378 if (rv != SECSuccess) in VerifyTXTRecords()
428 SECStatus rv = CERT_FindCertExtension(server_cert_nss, in CheckDNSSECChain() local
430 if (rv != SECSuccess) in CheckDNSSECChain()
557 SECStatus rv = SSL_GetNextProto(nss_fd_, &state, buf, &len, sizeof(buf)); in GetNextProto() local
558 if (rv != SECSuccess) { in GetNextProto()
559 NOTREACHED() << "Error return from SSL_GetNextProto: " << rv; in GetNextProto()
613 int rv = Init(); in Connect() local
614 if (rv != OK) { in Connect()
615 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); in Connect()
616 return rv; in Connect()
619 rv = InitializeSSLOptions(); in Connect()
620 if (rv != OK) { in Connect()
621 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); in Connect()
622 return rv; in Connect()
628 rv = InitializeSSLPeerName(); in Connect()
629 if (rv != OK) { in Connect()
630 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); in Connect()
631 return rv; in Connect()
637 rv = DoHandshakeLoop(OK); in Connect()
638 if (rv == ERR_IO_PENDING) { in Connect()
641 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); in Connect()
645 return rv > OK ? OK : rv; in Connect()
779 int rv = DoReadLoop(OK); in Read() local
781 if (rv == ERR_IO_PENDING) { in Read()
787 LeaveFunction(rv); in Read()
788 return rv; in Read()
808 int rv = DoWriteLoop(OK); in Write() local
810 if (rv == ERR_IO_PENDING) { in Write()
816 LeaveFunction(rv); in Write()
817 return rv; in Write()
866 int rv; in InitializeSSLOptions() local
868 rv = SSL_OptionSet(nss_fd_, SSL_SECURITY, PR_TRUE); in InitializeSSLOptions()
869 if (rv != SECSuccess) { in InitializeSSLOptions()
874 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_SSL2, PR_FALSE); in InitializeSSLOptions()
875 if (rv != SECSuccess) { in InitializeSSLOptions()
881 rv = SSL_OptionSet(nss_fd_, SSL_V2_COMPATIBLE_HELLO, PR_FALSE); in InitializeSSLOptions()
882 if (rv != SECSuccess) { in InitializeSSLOptions()
887 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_SSL3, ssl_config_.ssl3_enabled); in InitializeSSLOptions()
888 if (rv != SECSuccess) { in InitializeSSLOptions()
893 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_TLS, ssl_config_.tls1_enabled); in InitializeSSLOptions()
894 if (rv != SECSuccess) { in InitializeSSLOptions()
909 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_SESSION_TICKETS, PR_TRUE); in InitializeSSLOptions()
910 if (rv != SECSuccess) { in InitializeSSLOptions()
923 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_DEFLATE, ssl_config_.tls1_enabled); in InitializeSSLOptions()
924 if (rv != SECSuccess) in InitializeSSLOptions()
929 rv = SSL_OptionSet( in InitializeSSLOptions()
934 if (rv != SECSuccess) in InitializeSSLOptions()
944 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_RENEGOTIATION, in InitializeSSLOptions()
946 if (rv != SECSuccess) { in InitializeSSLOptions()
954 rv = SSL_SetNextProtoNego( in InitializeSSLOptions()
958 if (rv != SECSuccess) in InitializeSSLOptions()
965 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_OCSP_STAPLING, PR_TRUE); in InitializeSSLOptions()
966 if (rv != SECSuccess) in InitializeSSLOptions()
971 rv = SSL_OptionSet(nss_fd_, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE); in InitializeSSLOptions()
972 if (rv != SECSuccess) { in InitializeSSLOptions()
977 rv = SSL_AuthCertificateHook(nss_fd_, OwnAuthCertHandler, this); in InitializeSSLOptions()
978 if (rv != SECSuccess) { in InitializeSSLOptions()
984 rv = SSL_GetPlatformClientAuthDataHook(nss_fd_, PlatformClientAuthHandler, in InitializeSSLOptions()
987 rv = SSL_GetClientAuthDataHook(nss_fd_, ClientAuthHandler, this); in InitializeSSLOptions()
989 if (rv != SECSuccess) { in InitializeSSLOptions()
994 rv = SSL_HandshakeCallback(nss_fd_, HandshakeCallback, this); in InitializeSSLOptions()
995 if (rv != SECSuccess) { in InitializeSSLOptions()
1037 SECStatus rv = SSL_SetSockPeerID(nss_fd_, const_cast<char*>(peer_id.c_str())); in InitializeSSLPeerName() local
1038 if (rv != SECSuccess) in InitializeSSLPeerName()
1124 void SSLClientSocketNSS::DoReadCallback(int rv) { in DoReadCallback() argument
1125 EnterFunction(rv); in DoReadCallback()
1126 DCHECK(rv != ERR_IO_PENDING); in DoReadCallback()
1135 c->Run(rv); in DoReadCallback()
1139 void SSLClientSocketNSS::DoWriteCallback(int rv) { in DoWriteCallback() argument
1140 EnterFunction(rv); in DoWriteCallback()
1141 DCHECK(rv != ERR_IO_PENDING); in DoWriteCallback()
1150 c->Run(rv); in DoWriteCallback()
1161 void SSLClientSocketNSS::DoConnectCallback(int rv) { in DoConnectCallback() argument
1162 EnterFunction(rv); in DoConnectCallback()
1163 DCHECK_NE(rv, ERR_IO_PENDING); in DoConnectCallback()
1168 c->Run(rv > OK ? OK : rv); in DoConnectCallback()
1174 int rv = DoHandshakeLoop(result); in OnHandshakeIOComplete() local
1175 if (rv != ERR_IO_PENDING) { in OnHandshakeIOComplete()
1176 net_log_.EndEventWithNetErrorCode(net::NetLog::TYPE_SSL_CONNECT, rv); in OnHandshakeIOComplete()
1177 DoConnectCallback(rv); in OnHandshakeIOComplete()
1230 int rv = DoReadLoop(result); in OnRecvComplete() local
1231 if (rv != ERR_IO_PENDING) in OnRecvComplete()
1232 DoReadCallback(rv); in OnRecvComplete()
1239 int rv = last_io_result; in DoHandshakeLoop() local
1253 rv = DoHandshake(); in DoHandshakeLoop()
1256 rv = DoVerifyDNSSEC(rv); in DoHandshakeLoop()
1259 rv = DoVerifyDNSSECComplete(rv); in DoHandshakeLoop()
1262 DCHECK(rv == OK); in DoHandshakeLoop()
1263 rv = DoVerifyCert(rv); in DoHandshakeLoop()
1266 rv = DoVerifyCertComplete(rv); in DoHandshakeLoop()
1269 rv = ERR_UNEXPECTED; in DoHandshakeLoop()
1276 } while ((rv != ERR_IO_PENDING || network_moved) && in DoHandshakeLoop()
1279 return rv; in DoHandshakeLoop()
1292 int rv = ERR_UNEXPECTED; in DoReadLoop() local
1294 make_scoped_refptr(new SSLErrorParams(rv, 0))); in DoReadLoop()
1295 return rv; in DoReadLoop()
1299 int rv; in DoReadLoop() local
1301 rv = DoPayloadRead(); in DoReadLoop()
1303 } while (rv == ERR_IO_PENDING && network_moved); in DoReadLoop()
1306 return rv; in DoReadLoop()
1319 int rv = ERR_UNEXPECTED; in DoWriteLoop() local
1321 make_scoped_refptr(new SSLErrorParams(rv, 0))); in DoWriteLoop()
1322 return rv; in DoWriteLoop()
1326 int rv; in DoWriteLoop() local
1328 rv = DoPayloadWrite(); in DoWriteLoop()
1330 } while (rv == ERR_IO_PENDING && network_moved); in DoWriteLoop()
1333 return rv; in DoWriteLoop()
1339 SECStatus rv = SSL_ForceHandshake(nss_fd_); in DoHandshake() local
1350 if (rv == SECSuccess && SSL_InvalidateSession(nss_fd_) != SECSuccess) { in DoHandshake()
1353 } else if (rv == SECSuccess) { in DoHandshake()
1426 rv = SECFailure; in DoHandshake()
1607 int rv = DoReadLoop(OK); in DoVerifyCertComplete() local
1608 if (rv != ERR_IO_PENDING) in DoVerifyCertComplete()
1609 DoReadCallback(rv); in DoVerifyCertComplete()
1621 int rv = PR_Read(nss_fd_, user_read_buf_->data(), user_read_buf_len_); in DoPayloadRead() local
1626 rv = ERR_SSL_CLIENT_AUTH_CERT_NEEDED; in DoPayloadRead()
1628 make_scoped_refptr(new SSLErrorParams(rv, 0))); in DoPayloadRead()
1629 return rv; in DoPayloadRead()
1631 if (rv >= 0) { in DoPayloadRead()
1632 LogData(user_read_buf_->data(), rv); in DoPayloadRead()
1634 return rv; in DoPayloadRead()
1642 rv = HandleNSSError(prerr, false); in DoPayloadRead()
1644 make_scoped_refptr(new SSLErrorParams(rv, prerr))); in DoPayloadRead()
1645 return rv; in DoPayloadRead()
1651 int rv = PR_Write(nss_fd_, user_write_buf_->data(), user_write_buf_len_); in DoPayloadWrite() local
1652 if (rv >= 0) { in DoPayloadWrite()
1653 LogData(user_write_buf_->data(), rv); in DoPayloadWrite()
1655 return rv; in DoPayloadWrite()
1663 rv = HandleNSSError(prerr, false); in DoPayloadWrite()
1665 make_scoped_refptr(new SSLErrorParams(rv, prerr))); in DoPayloadWrite()
1666 return rv; in DoPayloadWrite()
1767 int rv = 0; in BufferSend() local
1772 rv = transport_->socket()->Write(send_buffer, len, in BufferSend()
1774 if (rv == ERR_IO_PENDING) { in BufferSend()
1777 memio_PutWriteResult(nss_bufs_, MapErrorToNSS(rv)); in BufferSend()
1781 LeaveFunction(rv); in BufferSend()
1782 return rv; in BufferSend()
1804 int rv; in BufferRecv() local
1807 rv = ERR_IO_PENDING; in BufferRecv()
1810 rv = transport_->socket()->Read(recv_buffer_, nb, &buffer_recv_callback_); in BufferRecv()
1811 if (rv == ERR_IO_PENDING) { in BufferRecv()
1814 if (rv > 0) in BufferRecv()
1815 memcpy(buf, recv_buffer_->data(), rv); in BufferRecv()
1816 memio_PutReadResult(nss_bufs_, MapErrorToNSS(rv)); in BufferRecv()
1820 LeaveFunction(rv); in BufferRecv()
1821 return rv; in BufferRecv()
1887 SECStatus rv = SSL_OptionGet(socket, SSL_ENABLE_FALSE_START, &false_start); in OwnAuthCertHandler() local
1888 DCHECK_EQ(SECSuccess, rv); in OwnAuthCertHandler()
1908 rv = SSL_OptionSet(socket, SSL_ENABLE_FALSE_START, PR_FALSE); in OwnAuthCertHandler()
1909 DCHECK_EQ(SECSuccess, rv); in OwnAuthCertHandler()