File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 11 -*- coding: utf-8 -*-
22Changes with Apache Traffic Server 6.0.0
33
4+ *) [TS-3667] Make SSL Handhake read correctly handle EOF and error cases.
5+
46 *) [TS-3560] Make proxy.config.http.slow.log.threshold overridable
57
68 *) [TS-3378] SpdyRequest used after free()
Original file line number Diff line number Diff line change @@ -347,11 +347,6 @@ SSLNetVConnection::read_raw_data()
347347 if (r <= 0 ) {
348348 if (r == -EAGAIN || r == -ENOTCONN) {
349349 NET_INCREMENT_DYN_STAT (net_calls_to_read_nodata_stat);
350- return r;
351- }
352-
353- if (!r || r == -ECONNRESET) {
354- return r;
355350 }
356351 return r;
357352 }
@@ -960,7 +955,22 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
960955 if (BIO_eof (SSL_get_rbio (this ->ssl ))) { // No more data in the buffer
961956 // Read from socket to fill in the BIO buffer with the
962957 // raw handshake data before calling the ssl accept calls.
963- this ->read_raw_data ();
958+ int retval = this ->read_raw_data ();
959+ if (retval < 0 ) {
960+ if (retval == -EAGAIN) {
961+ // No data at the moment, hang tight
962+ SSLDebugVC (this , " SSL handshake: EAGAIN" );
963+ return SSL_HANDSHAKE_WANT_READ;
964+ } else {
965+ // An error, make us go away
966+ SSLDebugVC (this , " SSL handshake error: read_retval=%d" , retval);
967+ return EVENT_ERROR;
968+ }
969+ } else if (retval == 0 ) {
970+ // EOF, go away, we stopped in the handshake
971+ SSLDebugVC (this , " SSL handshake error: EOF" );
972+ return EVENT_ERROR;
973+ }
964974 }
965975
966976 ssl_error_t ssl_error = SSLAccept (ssl);
You can’t perform that action at this time.
0 commit comments