ax(ueps): align verifyError variable name with idiomatic err convention
Comment on line 126 showed `err` but implementation used `verifyError`, violating AX Principle 2 (comment must match usage example) and Principle 1 (err is the RFC-sanctioned idiomatic name for local error variables). Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
58e5968b5f
commit
5ff08bfbd8
1 changed files with 2 additions and 2 deletions
|
|
@ -138,8 +138,8 @@ func TestPacket_MarshalAndSign_Ugly(t *testing.T) {
|
|||
copy(corrupted, frame)
|
||||
corrupted[len(corrupted)-1] ^= 0xFF
|
||||
|
||||
_, verifyError := ReadAndVerify(bufio.NewReader(bytes.NewReader(corrupted)), sharedSecret)
|
||||
if verifyError == nil {
|
||||
_, err = ReadAndVerify(bufio.NewReader(bytes.NewReader(corrupted)), sharedSecret)
|
||||
if err == nil {
|
||||
t.Error("expected HMAC integrity violation for corrupted frame, got nil")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue