Add support for TLSv1.3 CLIENT_HANDSHAKE_TRAFFIC_SECRET
Update: We worked around this issue by refusing TLS 1.3 connections and favoring 1.2 or others instead. This was merged in #193. This ticket initially reported the bug that was worked-around but is now used to track the efforts to support TLS 1.3 itself.
The CLIENT_RANDOM isn't enough to decrypt TLSv1.3 traffic. The following zip contains a pcap with TLSv1.3, the CLIENT_RANDOM, and a TLS debug file.
This seems to be caused by the fact that the format of the CLIENT_RANDOM has changed and is not fixed-length anymore, and that CLIENT_HANDSHAKE_TRAFFIC_SECRET should be used instead.
This should be a simple change in PyRDP, but I’m unsure how it can be done.
reference: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format
Also, wireshark's tls dissector failure message:
tls13_load_secret Cannot find CLIENT_HANDSHAKE_TRAFFIC_SECRET, decryption impossible
We merged a downgrade workaround in #193. Since this ticket contains a helpful pcap file, I'll turn it into a feature request and keep it.