XMPP::TLSChannelBindingDowngradeProtection
XEP-0515: TLS Channel-Binding Downgrade Protection
The server's t attribute is part of the signed SCRAM
server-first-message. Comparing it with the locally negotiated TLS version
prevents a MITM from using different TLS versions on each side in order to
downgrade the available channel-binding types.
Constants
TLS_VERSION_CODES = {"TLSv1.3" => "0304", "TLSv1.2" => "0303", "TLSv1.1" => "0302", "TLSv1" => "0301", "TLSv1.0" => "0301"}
Class methods
Verifies the optional XEP-0515 SCRAM attribute.
A missing t attribute means that the server does not implement
XEP-0515. If an implementing server's attribute were removed in transit,
the SCRAM proof would still fail because the original server-first-message
is included in SCRAM's AuthMessage.