Lines Matching refs:rv_

74     : sslSession_(nullptr), tlsContext_(tlsContext), rv_(0)  in GnuTLSSession()
110 rv_ = gnutls_init(&sslSession_, flags); in init()
112 rv_ = gnutls_init(&sslSession_, tlsContext_->getSide() == TLS_CLIENT in init()
116 if (rv_ != GNUTLS_E_SUCCESS) { in init()
123 rv_ = gnutls_session_ticket_enable_client(sslSession_); in init()
124 if (rv_ != GNUTLS_E_SUCCESS) { in init()
134 rv_ = gnutls_priority_set_direct(sslSession_, "@SYSTEM", &err); in init()
152 rv_ = gnutls_priority_set_direct(sslSession_, pri.c_str(), &err); in init()
154 if (rv_ != GNUTLS_E_SUCCESS) { in init()
158 rv_ = gnutls_credentials_set(sslSession_, GNUTLS_CRD_CERTIFICATE, in init()
160 if (rv_ != GNUTLS_E_SUCCESS) { in init()
173 rv_ = gnutls_server_name_set(sslSession_, GNUTLS_NAME_DNS, hostname.c_str(), in setSNIHostname()
175 if (rv_ != GNUTLS_E_SUCCESS) { in setSNIHostname()
183 rv_ = gnutls_bye(sslSession_, GNUTLS_SHUT_WR); in closeConnection()
184 if (rv_ == GNUTLS_E_SUCCESS) { in closeConnection()
187 else if (rv_ == GNUTLS_E_AGAIN || rv_ == GNUTLS_E_INTERRUPTED) { in closeConnection()
203 while ((rv_ = gnutls_record_send(sslSession_, data, len)) == in writeData()
206 if (rv_ >= 0) { in writeData()
207 ssize_t ret = rv_; in writeData()
208 rv_ = 0; in writeData()
211 else if (rv_ == GNUTLS_E_AGAIN || rv_ == GNUTLS_E_INTERRUPTED) { in writeData()
221 while ((rv_ = gnutls_record_recv(sslSession_, data, len)) == in readData()
224 if (rv_ >= 0) { in readData()
225 ssize_t ret = rv_; in readData()
226 rv_ = 0; in readData()
229 else if (rv_ == GNUTLS_E_AGAIN || rv_ == GNUTLS_E_INTERRUPTED) { in readData()
242 rv_ = gnutls_handshake(sslSession_); in tlsConnect()
243 if (rv_ == GNUTLS_E_SUCCESS) { in tlsConnect()
246 if (rv_ == GNUTLS_E_AGAIN || rv_ == GNUTLS_E_INTERRUPTED) { in tlsConnect()
249 if (gnutls_error_is_fatal(rv_)) { in tlsConnect()
256 rv_ = gnutls_certificate_verify_peers2(sslSession_, &status); in tlsConnect()
257 if (rv_ != GNUTLS_E_SUCCESS) { in tlsConnect()
299 rv_ = gnutls_x509_crt_init(&cert); in tlsConnect()
300 if (rv_ != GNUTLS_E_SUCCESS) { in tlsConnect()
306 rv_ = gnutls_x509_crt_import(cert, &peerCerts[0], GNUTLS_X509_FMT_DER); in tlsConnect()
307 if (rv_ != GNUTLS_E_SUCCESS) { in tlsConnect()
368 rv_ = gnutls_handshake(sslSession_); in tlsAccept()
369 if (rv_ == GNUTLS_E_SUCCESS) { in tlsAccept()
373 if (rv_ == GNUTLS_E_AGAIN || rv_ == GNUTLS_E_INTERRUPTED) { in tlsAccept()
376 if (gnutls_error_is_fatal(rv_)) { in tlsAccept()
382 std::string GnuTLSSession::getLastErrorString() { return gnutls_strerror(rv_); } in getLastErrorString()