diff options
-rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 6 |
1 files 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 @@ | |||
1 | /* $OpenBSD: wycheproof.go,v 1.116 2020/01/27 00:37:59 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.117 2020/04/27 19:34:59 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2018, 2019 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018, 2019 Theo Buehler <tb@openbsd.org> |
@@ -1117,7 +1117,7 @@ func checkAeadOpen(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen | |||
1117 | } | 1117 | } |
1118 | 1118 | ||
1119 | success := false | 1119 | success := false |
1120 | if bytes.Equal(openedMsg, msg) || wt.Result == "invalid" { | 1120 | if bytes.Equal(openedMsg, msg) == (wt.Result != "invalid") { |
1121 | if acceptableAudit && wt.Result == "acceptable" { | 1121 | if acceptableAudit && wt.Result == "acceptable" { |
1122 | gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) | 1122 | gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) |
1123 | } | 1123 | } |
@@ -1163,7 +1163,7 @@ func checkAeadSeal(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen | |||
1163 | sealedTag := sealed[msgLen:maxOutLen] | 1163 | sealedTag := sealed[msgLen:maxOutLen] |
1164 | 1164 | ||
1165 | success := false | 1165 | success := false |
1166 | if bytes.Equal(sealedCt, ct) && bytes.Equal(sealedTag, tag) || wt.Result == "invalid" { | 1166 | if (bytes.Equal(sealedCt, ct) && bytes.Equal(sealedTag, tag)) == (wt.Result != "invalid") { |
1167 | if acceptableAudit && wt.Result == "acceptable" { | 1167 | if acceptableAudit && wt.Result == "acceptable" { |
1168 | gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) | 1168 | gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) |
1169 | } | 1169 | } |