You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2015/07/22 22:23:09 UTC
trafficserver git commit: TS-3788: SNI Callbacks stall after TS-3667
fix
Repository: trafficserver
Updated Branches:
refs/heads/master 0ca8bff4c -> ed48c9053
TS-3788: SNI Callbacks stall after TS-3667 fix
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ed48c905
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ed48c905
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ed48c905
Branch: refs/heads/master
Commit: ed48c9053c80372413b631be7946b7d30728e9e3
Parents: 0ca8bff
Author: shinrich <sh...@yahoo-inc.com>
Authored: Wed Jul 22 15:06:54 2015 -0500
Committer: shinrich <sh...@yahoo-inc.com>
Committed: Wed Jul 22 15:21:55 2015 -0500
----------------------------------------------------------------------
iocore/net/SSLNetVConnection.cc | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ed48c905/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index ebeda32..0ecad71 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -1065,23 +1065,14 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
return EVENT_DONE;
}
- // All the pre-accept hooks have completed, proceed with the actual accept.
+ int retval = 1; // Initialze with a non-error value
+ // All the pre-accept hooks have completed, proceed with the actual accept.
if (BIO_eof(SSL_get_rbio(this->ssl))) { // No more data in the buffer
// Read from socket to fill in the BIO buffer with the
// raw handshake data before calling the ssl accept calls.
- int retval = this->read_raw_data();
- if (retval < 0) {
- if (retval == -EAGAIN) {
- // No data at the moment, hang tight
- SSLDebugVC(this, "SSL handshake: EAGAIN");
- return SSL_HANDSHAKE_WANT_READ;
- } else {
- // An error, make us go away
- SSLDebugVC(this, "SSL handshake error: read_retval=%d", retval);
- return EVENT_ERROR;
- }
- } else if (retval == 0) {
+ retval = this->read_raw_data();
+ if (retval == 0) {
// EOF, go away, we stopped in the handshake
SSLDebugVC(this, "SSL handshake error: EOF");
return EVENT_ERROR;
@@ -1183,6 +1174,15 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
case SSL_ERROR_WANT_READ:
TraceIn(trace, get_remote_addr(), get_remote_port(), "SSL server handshake ERROR_WANT_READ");
+ if (retval == -EAGAIN) {
+ // No data at the moment, hang tight
+ SSLDebugVC(this, "SSL handshake: EAGAIN");
+ return SSL_HANDSHAKE_WANT_READ;
+ } else if (retval < 0) {
+ // An error, make us go away
+ SSLDebugVC(this, "SSL handshake error: read_retval=%d", retval);
+ return EVENT_ERROR;
+ }
return SSL_HANDSHAKE_WANT_READ;
// This value is only defined in openssl has been patched to