Skip to content

Commit 58cf7b7

Browse files
committed
FIX: TLS: moved computation of the message-hash checksum into proper section (where possible error can be trapped)
1 parent 0b95aeb commit 58cf7b7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/mezz/prot-tls.r

+3-4
Original file line numberDiff line numberDiff line change
@@ -1379,17 +1379,16 @@ TLS-read-handshake-message: function [
13791379
ctx/server-random
13801380
]
13811381

1382-
message-hash: checksum/method message hash-algorithm
1383-
;?? message-hash
1384-
13851382
either hash-algorithm = 'md5_sha1 [
13861383
;__private_rsa_verify_hash_md5sha1
13871384
log-error "legacy __private_rsa_verify_hash_md5sha1 not implemented yet!"
1388-
;halt
1385+
return *Alert/Decode_error
13891386
][
13901387
log-more "Checking signature using RSA"
13911388
if any [
13921389
error? err: try [
1390+
message-hash: checksum/method message hash-algorithm
1391+
;?? message-hash
13931392
;decrypt the `signature` with server's public key
13941393
rsa-key: apply :rsa-init ctx/server-certs/1/public-key/rsaEncryption
13951394
signature: rsa/verify rsa-key signature

0 commit comments

Comments
 (0)