@@ -738,25 +738,22 @@ client-key-exchange: function [
738
738
;?? iv-size
739
739
740
740
unless is-aead? [
741
- local-mac: take/part key-expansion mac-size
741
+ local-mac: take/part key-expansion mac-size
742
742
remote-mac: take/part key-expansion mac-size
743
743
]
744
744
745
- local-key: take/part key-expansion crypt-size
745
+ local-key: take/part key-expansion crypt-size
746
746
remote-key: take/part key-expansion crypt-size
747
747
748
- log-more ["Client-mac: ^[ [32m" local-mac ]
749
- log-more ["Server-mac: ^[ [32m" remote-mac ]
750
- log-more ["Client-key: ^[ [32m" local-key]
751
- log-more ["Server-key: ^[ [32m" remote-key]
752
-
753
- local-IV: take/part key-expansion iv-size
748
+ local-IV: take/part key-expansion iv-size
754
749
remote-IV: take/part key-expansion iv-size
755
-
756
- log-more ["Client-IV: ^[ [32m" local-IV]
757
- log-more ["Server-IV: ^[ [32m" remote-IV]
758
750
759
- key-expansion: none
751
+ log-more ["Local-IV: ^[ [32m" local-IV]
752
+ log-more ["Local-mac: ^[ [32m" local-mac]
753
+ log-more ["Local-key: ^[ [32m" local-key]
754
+ log-more ["Remote-IV: ^[ [32m" remote-IV]
755
+ log-more ["Remote-mac: ^[ [32m" remote-mac]
756
+ log-more ["Remote-key: ^[ [32m" remote-key]
760
757
761
758
encrypt-port: open [
762
759
scheme: 'crypt
@@ -773,8 +770,7 @@ client-key-exchange: function [
773
770
]
774
771
775
772
; not needed anymore...
776
- local-key: none
777
- remote-key: none
773
+ key-expansion: local-key: remote-key: none
778
774
779
775
TLS-update-messages-hash ctx (at head out/buffer pos-record) length-record
780
776
]
@@ -973,9 +969,9 @@ encrypt-data: function [
973
969
modify encrypt-port 'init-vector local-IV
974
970
975
971
;?? ctx/seq-write
976
- log-more ["Client -IV: ^[ [32m" local-IV]
977
- log-more ["Client -mac: ^[ [32m" local-mac]
978
- log-more ["Hash-method: ^[ [32m" hash-method]
972
+ log-more ["Local -IV: ^[ [32m" local-IV]
973
+ log-more ["Local -mac: ^[ [32m" local-mac]
974
+ log-more ["Hash-method:^[ [32m" hash-method]
979
975
980
976
; Message Authentication Code
981
977
; https://tools.ietf.org/html/rfc5246#section-6.2.3.1
@@ -1515,10 +1511,7 @@ TLS-parse-handshake-message: function [
1515
1511
if ends > pos: index? msg/buffer [
1516
1512
len: ends - pos
1517
1513
binary/read msg [extra: BYTES :len ]
1518
- log-error [
1519
- "Extra" len "bytes at the end of message:"
1520
- mold extra
1521
- ]
1514
+ log-error ["Extra" len "bytes at the end of message:" ellipsize form extra 40 ]
1522
1515
return *Alert/Decode_error
1523
1516
]
1524
1517
0 commit comments