summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-01-13 15:32:24 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-01-18 18:43:44 +0800
commitb7e1f0cd2c2764cc33724aa0cdd16b00e4af9fc2 (patch)
tree6945f7461611ecf27d58d33d60518d6fa2fffba0
parentbfb6090cb2247cfc6c750226a522a46e4f7ac5e2 (diff)
downloadlinux-crypto-b7e1f0cd2c2764cc33724aa0cdd16b00e4af9fc2.tar.gz
linux-crypto-b7e1f0cd2c2764cc33724aa0cdd16b00e4af9fc2.zip
crypto: testmgr - skip AEAD encryption test vectors with novrfy set
In preparation for unifying the AEAD encryption and decryption test vectors, skip AEAD test vectors with the 'novrfy' (verification failure expected) flag set when testing encryption rather than decryption. These test vectors only make sense for decryption. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/testmgr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index fd31cfa8..09f2f0f5 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -671,6 +671,8 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
for (i = 0, j = 0; i < tcount; i++) {
if (template[i].np)
continue;
+ if (enc && template[i].novrfy)
+ continue;
j++;
@@ -787,6 +789,9 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
if (!template[i].np)
continue;
+ if (enc && template[i].novrfy)
+ continue;
+
j++;
if (template[i].iv)