Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Unified Diff: net/socket/ssl_client_socket_openssl.h

Issue 367963007: Preserve transport errors for OpenSSL sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sleevi comments; also fix last-minute bug introduced in patch set 2 (oops) Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_openssl.h
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index ac85483c4e370bc08287309abcba64353f8a5631..19feddb78ebcd6a82fb280369aa2e88c5524f6cf 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -147,9 +147,23 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
int SelectNextProtoCallback(unsigned char** out, unsigned char* outlen,
const unsigned char* in, unsigned int inlen);
+ // Called during an operation on |transport_bio_|'s peer. Checks saved
+ // transport error state and, if appropriate, returns an error through
+ // OpenSSL's error system.
+ long MaybeReplayTransportError(BIO *bio,
+ int cmd,
+ const char *argp, int argi, long argl,
+ long retvalue);
+
+ // Callback from the SSL layer when an operation is performed on
+ // |transport_bio_|'s peer.
+ static long BIOCallback(BIO *bio,
+ int cmd,
+ const char *argp, int argi, long argl,
+ long retvalue);
+
bool transport_send_busy_;
bool transport_recv_busy_;
- bool transport_recv_eof_;
scoped_refptr<DrainableIOBuffer> send_buffer_;
scoped_refptr<IOBuffer> recv_buffer_;
@@ -176,6 +190,11 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
// indicates an error.
int pending_read_error_;
+ // Used by TransportReadComplete() to signify an error reading from the
+ // transport socket. A value of OK indicates the socket is still
+ // readable. EOFs are mapped to ERR_CONNECTION_CLOSED.
+ int transport_read_error_;
+
// Used by TransportWriteComplete() and TransportReadComplete() to signify an
// error writing to the transport socket. A value of OK indicates no error.
int transport_write_error_;
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698