From 3dc4b54835daf17c64839ec42736a755195c54cf Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 27 Apr 2020 19:34:59 +0000 Subject: Fix a logic error that hid the failing ZeroLengthIv tests. This issue was fixed in lib/libcrypto/evp/e_aes.c r1.40. --- src/regress/lib/libcrypto/wycheproof/wycheproof.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index e19d4c3eda..23e3b46431 100644 --- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go @@ -1,4 +1,4 @@ -/* $OpenBSD: wycheproof.go,v 1.116 2020/01/27 00:37:59 tb Exp $ */ +/* $OpenBSD: wycheproof.go,v 1.117 2020/04/27 19:34:59 tb Exp $ */ /* * Copyright (c) 2018 Joel Sing * Copyright (c) 2018, 2019 Theo Buehler @@ -1117,7 +1117,7 @@ func checkAeadOpen(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen } success := false - if bytes.Equal(openedMsg, msg) || wt.Result == "invalid" { + if bytes.Equal(openedMsg, msg) == (wt.Result != "invalid") { if acceptableAudit && wt.Result == "acceptable" { gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) } @@ -1163,7 +1163,7 @@ func checkAeadSeal(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen sealedTag := sealed[msgLen:maxOutLen] success := false - if bytes.Equal(sealedCt, ct) && bytes.Equal(sealedTag, tag) || wt.Result == "invalid" { + if (bytes.Equal(sealedCt, ct) && bytes.Equal(sealedTag, tag)) == (wt.Result != "invalid") { if acceptableAudit && wt.Result == "acceptable" { gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) } -- cgit v1.2.3-55-g6feb