Skip to content

Commit

Permalink
FIX: Read and process all input data during TLS handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jan 24, 2025
1 parent 7635c83 commit 1470fdf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.18.2
3.18.3
4 changes: 2 additions & 2 deletions make/r3-view.rc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
101 ICON "icon/r3.ico"

1 VERSIONINFO
FILEVERSION 3,18,2,0
PRODUCTVERSION 3,18,2,0
FILEVERSION 3,18,3,0
PRODUCTVERSION 3,18,3,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
Expand Down
4 changes: 2 additions & 2 deletions make/r3.rc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
101 ICON "icon/r3.ico"

1 VERSIONINFO
FILEVERSION 3,18,2,0
PRODUCTVERSION 3,18,2,0
FILEVERSION 3,18,3,0
PRODUCTVERSION 3,18,3,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
Expand Down
2 changes: 1 addition & 1 deletion make/rebol3.nest
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ temp: %make/tmp/
stack-size: 4194304 ;= 4MB (4 * 1024 * 1024)
optimize: 2

version: 3.18.2
version: 3.18.3

#if Linux? [ defines: TO_LINUX ]
#if macOS? [ defines: TO_MACOS ]
Expand Down
13 changes: 5 additions & 8 deletions src/mezz/prot-tls.reb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ REBOL [
See: http://www.apache.org/licenses/LICENSE-2.0
}
Author: ["Richard 'Cyphre' Smolak" "Oldes" "Brian Dickens (Hostilefork)"]
Version: 0.9.2
Date: 24-May-2022
Version: 0.9.3
Date: 24-Jan-2025
history: [
0.6.1 "Cyphre" "Initial implementation used in old R3-alpha"
0.7.0 "Oldes" {
Expand All @@ -36,6 +36,7 @@ REBOL [
0.9.0 "Oldes" "Added (limited) support for a `server` role"
0.9.1 "Oldes" "Improved initialization to be able reuse already opened TCP port"
0.9.2 "Oldes" "Added support for GCM and SHA384 crypt modes"
0.9.3 "Oldes" "FIX: Read and process all input data during handshake"
]
todo: {
* cached sessions
Expand Down Expand Up @@ -1513,10 +1514,8 @@ TLS-read-data: function [
either ctx/cipher-spec-set > 1 [
ctx/seq-read: 0
data: decrypt-msg ctx data :type
;ctx/protocol: 'APPLICATION
;change-state ctx 'APPLICATION
ctx/reading?: ctx/server?
;?? data
;; Don't stop reading if there is still content in the input buffer!
ctx/reading?: any [ctx/server? not empty? inp/buffer]
][
TLS-update-messages-hash ctx data len
]
Expand All @@ -1531,8 +1530,6 @@ TLS-read-data: function [
ctx/cipher-spec-set: 2
ctx/seq-read: 0
ctx/reading?: true ;ctx/server?
;ctx/protocol: 'APPLICATION
;change-state ctx 'APPLICATION
][
log-error ["*** CHANGE_CIPHER_SPEC value should be 1 but is:" value]
]
Expand Down

0 comments on commit 1470fdf

Please sign in to comment.