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

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit bc11f601e2ea0cc1e0d858a8e35ab2ae37fd214b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 27 16:44:30 2021 +0100

    Handle new TLS handshake state.
    
    Only applies to DLTS so is always an error here
---
 java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java | 9 ++++++---
 java/org/apache/tomcat/websocket/LocalStrings.properties        | 2 +-
 java/org/apache/tomcat/websocket/LocalStrings_fr.properties     | 2 +-
 java/org/apache/tomcat/websocket/LocalStrings_ja.properties     | 2 +-
 java/org/apache/tomcat/websocket/LocalStrings_ko.properties     | 2 +-
 java/org/apache/tomcat/websocket/LocalStrings_zh_CN.properties  | 1 -
 6 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java 
b/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
index a72949e..34485e9 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
@@ -411,9 +411,12 @@ public class AsyncChannelWrapperSecure implements 
AsyncChannelWrapper {
                             handshaking = false;
                             break;
                         }
-                        case NOT_HANDSHAKING: {
-                            throw new SSLException(
-                                    
sm.getString("asyncChannelWrapperSecure.notHandshaking"));
+                        case NOT_HANDSHAKING:
+                            // Don't expect to see this during a handshake
+                        case NEED_UNWRAP_AGAIN: {
+                            // Only applies to DLTS
+                            throw new SSLException(sm.getString(
+                                    
"asyncChannelWrapperSecure.unexpectedHandshakeState", handshakeStatus));
                         }
                     }
                 }
diff --git a/java/org/apache/tomcat/websocket/LocalStrings.properties 
b/java/org/apache/tomcat/websocket/LocalStrings.properties
index 382cc04..9031baf 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings.properties
@@ -22,10 +22,10 @@ asyncChannelWrapperSecure.closeFail=Failed to close channel 
cleanly
 asyncChannelWrapperSecure.concurrentRead=Concurrent read operations are not 
permitted
 asyncChannelWrapperSecure.concurrentWrite=Concurrent write operations are not 
permitted
 asyncChannelWrapperSecure.eof=Unexpected end of stream
-asyncChannelWrapperSecure.notHandshaking=Unexpected state [NOT_HANDSHAKING] 
during TLS handshake
 asyncChannelWrapperSecure.statusUnwrap=Unexpected Status of SSLEngineResult 
after an unwrap() operation
 asyncChannelWrapperSecure.statusWrap=Unexpected Status of SSLEngineResult 
after a wrap() operation
 asyncChannelWrapperSecure.tooBig=The result [{0}] is too big to be expressed 
as an Integer
+asyncChannelWrapperSecure.unexpectedHandshakeState=Unexpected state [{0}] 
during TLS handshake
 asyncChannelWrapperSecure.wrongStateRead=Flag that indicates a read is in 
progress was found to be false (it should have been true) when trying to 
complete a read operation
 asyncChannelWrapperSecure.wrongStateWrite=Flag that indicates a write is in 
progress was found to be false (it should have been true) when trying to 
complete a write operation
 
diff --git a/java/org/apache/tomcat/websocket/LocalStrings_fr.properties 
b/java/org/apache/tomcat/websocket/LocalStrings_fr.properties
index 72f3c1e..acaa7c1 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings_fr.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings_fr.properties
@@ -22,10 +22,10 @@ asyncChannelWrapperSecure.closeFail=Impossible de fermer 
proprement le canal
 asyncChannelWrapperSecure.concurrentRead=Les opérations de lecture 
concurrentes ne sont pas permises
 asyncChannelWrapperSecure.concurrentWrite=Les opérations d'écriture 
concurrentes ne sont pas permises
 asyncChannelWrapperSecure.eof=Fin de flux inattendue
-asyncChannelWrapperSecure.notHandshaking=Etat NOT_HANDSHAKING inattendu 
pendant la négociation TLS
 asyncChannelWrapperSecure.statusUnwrap=Etat inattendu de SSLEngineResult après 
une opération unwrap()
 asyncChannelWrapperSecure.statusWrap=Etat inattendu de SSLEngineResult après 
une opération wrap()
 asyncChannelWrapperSecure.tooBig=Le résultat [{0}] est trop grand pour pouvoir 
être converti en Integer
+asyncChannelWrapperSecure.unexpectedHandshakeState=Etat [{0}] inattendu 
pendant la négociation TLS
 asyncChannelWrapperSecure.wrongStateRead=L'indicateur de lecture en cours 
était faux alors qu'il aurait dû vrai lors d'une tentative pour terminer une 
opération de lecture
 asyncChannelWrapperSecure.wrongStateWrite=L'indicateur d'écriture en cours 
était faux alors qu'il aurait dû vrai lors d'une tentative pour terminer une 
opération d'écriture
 
diff --git a/java/org/apache/tomcat/websocket/LocalStrings_ja.properties 
b/java/org/apache/tomcat/websocket/LocalStrings_ja.properties
index 3813553..ca24dfe 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings_ja.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings_ja.properties
@@ -22,10 +22,10 @@ asyncChannelWrapperSecure.closeFail=チャンネルをきれいに閉じるこ
 asyncChannelWrapperSecure.concurrentRead=コンカレントな読み取り操作を行うことはできません。
 asyncChannelWrapperSecure.concurrentWrite=コンカレントな書き込み操作を行うことはできません。
 asyncChannelWrapperSecure.eof=予期せぬ位置にストリームの終端を検出しました。
-asyncChannelWrapperSecure.notHandshaking=TLSハンドシェイク中に予期しない状態[NOT_HANDSHAKING]
 asyncChannelWrapperSecure.statusUnwrap=unwrap()操作後のSSLEngineResultの予期しないステータス
 asyncChannelWrapperSecure.statusWrap=wrap()操作後のSSLEngineResultの予期しないステータス。
 asyncChannelWrapperSecure.tooBig=Integer として解釈するには大きすぎる結果 [{0}] です。
+asyncChannelWrapperSecure.unexpectedHandshakeState=TLSハンドシェイク中に予期しない状態[{0}]
 asyncChannelWrapperSecure.wrongStateRead=読み取り操作の完了中に読み取り中を意味するフラグが false 
になっていることを検出しました (true になっているべきです)。
 
asyncChannelWrapperSecure.wrongStateWrite=書き込み操作を完了しようとすると、書き込みが進行中であることを示すフラグがfalse(trueであったはずです)であることが判明しました。
 
diff --git a/java/org/apache/tomcat/websocket/LocalStrings_ko.properties 
b/java/org/apache/tomcat/websocket/LocalStrings_ko.properties
index dc4e6b9..57d7532 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings_ko.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings_ko.properties
@@ -22,10 +22,10 @@ asyncChannelWrapperSecure.closeFail=채널을 깨끗하게 닫지 못했습니
 asyncChannelWrapperSecure.concurrentRead=동시 발생적인 읽기 오퍼레이션들은 허용되지 않습니다.
 asyncChannelWrapperSecure.concurrentWrite=동시적인 쓰기 오퍼레이션들은 허용되지 않습니다.
 asyncChannelWrapperSecure.eof=예기치 않은 스트림의 끝
-asyncChannelWrapperSecure.notHandshaking=TLS handshake 과정 중 예기치 않은 상태 
[NOT_HANDSHAKING]입니다.
 asyncChannelWrapperSecure.statusUnwrap=unwrap() 오퍼레이션 후에, SSLEngineResult의 예기치 
않은 상태입니다.
 asyncChannelWrapperSecure.statusWrap=wrap() 오퍼레이션 수행 이후, SSLEngineResult의 예기치 
않은 상태입니다.
 asyncChannelWrapperSecure.tooBig=결과 [{0}]이(가) 너무 커서, 정수로서 표현될 수 없습니다.
+asyncChannelWrapperSecure.unexpectedHandshakeState=TLS handshake 과정 중 예기치 않은 
상태 [{0}]입니다.
 asyncChannelWrapperSecure.wrongStateRead=읽기 오퍼레이션을 완료하려 시도할 때에, 읽기 진행 중임을 표시하는 
플래그가 false인 것으로 (true였어만 했음에도) 밝혀졌습니다.
 asyncChannelWrapperSecure.wrongStateWrite=쓰기 오퍼레이션을 완료하려 시도할 때, 쓰기 진행 중이라는 
플래그가 false로 (true였어야 함에도) 밝혀졌습니다.
 
diff --git a/java/org/apache/tomcat/websocket/LocalStrings_zh_CN.properties 
b/java/org/apache/tomcat/websocket/LocalStrings_zh_CN.properties
index 61ac558..0b01791 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings_zh_CN.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings_zh_CN.properties
@@ -22,7 +22,6 @@ asyncChannelWrapperSecure.closeFail=干净的关闭通道失败
 asyncChannelWrapperSecure.concurrentRead=不允许并发读取操作
 asyncChannelWrapperSecure.concurrentWrite=不允许并发写操作
 asyncChannelWrapperSecure.eof=意外的流结尾
-asyncChannelWrapperSecure.notHandshaking=TLS握手过程中出现意外状态[非握手]
 asyncChannelWrapperSecure.statusUnwrap=unwrap()操作后SSLEngineResult 的意外状态
 asyncChannelWrapperSecure.statusWrap=wrap()操作后SSLEngineResult的意外状态
 asyncChannelWrapperSecure.tooBig=结果[{0}]太大,无法表示为整数

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to