You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2021/05/01 13:34:21 UTC

[httpcomponents-core] branch master updated (5e15a6f -> 32620d1)

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git.


 discard 5e15a6f  HTTPCORE-676: fixed incorrect handling of TLS renegotiation by non-blocking i/o sessions
     new 32620d1  HTTPCORE-676: fixed incorrect handling of TLS renegotiation by non-blocking i/o sessions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5e15a6f)
            \
             N -- N -- N   refs/heads/master (32620d1)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[httpcomponents-core] 01/01: HTTPCORE-676: fixed incorrect handling of TLS renegotiation by non-blocking i/o sessions

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit 32620d1005fead628fe728c7e8e6a69930a1b6ac
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sat May 1 15:26:20 2021 +0200

    HTTPCORE-676: fixed incorrect handling of TLS renegotiation by non-blocking i/o sessions
---
 .../apache/hc/core5/reactor/ssl/SSLIOSession.java    | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
index 4b90d93..24c04c4 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
@@ -289,14 +289,10 @@ public class SSLIOSession implements IOSession {
         }
     }
 
-    private void doRunTask() throws SSLException {
-        try {
-            final Runnable r = this.sslEngine.getDelegatedTask();
-            if (r != null) {
-                r.run();
-            }
-        } catch (final RuntimeException ex) {
-            throw convert(ex);
+    private void doRunTask() {
+        final Runnable r = this.sslEngine.getDelegatedTask();
+        if (r != null) {
+            r.run();
         }
     }
 
@@ -425,6 +421,10 @@ public class SSLIOSession implements IOSession {
                 }
                 return;
             }
+            // Is there a task pending?
+            if (this.sslEngine.getHandshakeStatus() == HandshakeStatus.NEED_TASK) {
+                doRunTask();
+            }
             // Need to toggle the event mask for this channel?
             final int oldMask = this.session.getEventMask();
             int newMask = oldMask;
@@ -438,10 +438,6 @@ public class SSLIOSession implements IOSession {
                 case NOT_HANDSHAKING:
                     newMask = this.appEventMask;
                     break;
-                case NEED_TASK:
-                    break;
-                case FINISHED:
-                    break;
             }
 
             if (this.endOfStream && !this.inPlain.hasData()) {