hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [10/50] httpcomponents-core git commit: HTTPCORE-319: terminate non-blocking SSLIOSession if the SSL handshake is aborted by the oppositve endpoint leaving the SSL engine in the NEED_UNWRAP state
Date Tue, 09 May 2017 20:03:01 GMT
HTTPCORE-319: terminate non-blocking SSLIOSession if the SSL handshake is aborted by the oppositve
endpoint leaving the SSL engine in the NEED_UNWRAP state

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.2.x@1418951
13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/e8063d96
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/e8063d96
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/e8063d96

Branch: refs/heads/4.2.x
Commit: e8063d965d1f522e318b7f3ed186a951307b59a0
Parents: 522e23f
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Sun Dec 9 13:42:10 2012 +0000
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Sun Dec 9 13:42:10 2012 +0000

----------------------------------------------------------------------
 .../java/org/apache/http/nio/reactor/ssl/SSLIOSession.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/e8063d96/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
b/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
index 1a08f5c..2613b66 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
@@ -288,10 +288,16 @@ public class SSLIOSession implements IOSession, SessionBufferStatus,
SocketAcces
     }
 
     private void updateEventMask() {
+        // Graceful session termination
         if (this.status == CLOSING && this.sslEngine.isOutboundDone()
                 && (this.endOfStream || this.sslEngine.isInboundDone())) {
             this.status = CLOSED;
         }
+        // Abnormal session termination
+        if (this.status == ACTIVE && this.endOfStream
+                && this.sslEngine.getHandshakeStatus() == HandshakeStatus.NEED_UNWRAP)
{
+            this.status = CLOSED;
+        }
         if (this.status == CLOSED) {
             this.session.close();
             return;


Mime
View raw message