ax(ueps): fix inaccurate usage example in ReadAndVerify default case

The comment omitted tagValueLength from the signedData write sequence,
making it an incorrect usage example (AX Principle 2).

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 10:41:54 +01:00
parent 2a43c0a39f
commit 80b8b20507
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -85,7 +85,7 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
case TagHMAC:
hmacSignature = tagValue
default:
// signedData.WriteByte(tagByte); signedData.Write(tagValue) — unknown tags contribute to HMAC, blocking injection
// signedData.WriteByte(tagByte); signedData.WriteByte(tagValueLength); signedData.Write(tagValue) — unknown tags contribute to HMAC, blocking injection
signedData.WriteByte(tagByte)
signedData.WriteByte(tagValueLength)
signedData.Write(tagValue)