aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r--crypto/testmgr.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index d4944318ca1f..6d4da8fd24fd 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -488,6 +488,8 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
488 aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, 488 aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
489 tcrypt_complete, &result); 489 tcrypt_complete, &result);
490 490
491 iv_len = crypto_aead_ivsize(tfm);
492
491 for (i = 0, j = 0; i < tcount; i++) { 493 for (i = 0, j = 0; i < tcount; i++) {
492 if (template[i].np) 494 if (template[i].np)
493 continue; 495 continue;
@@ -508,7 +510,6 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
508 510
509 memcpy(input, template[i].input, template[i].ilen); 511 memcpy(input, template[i].input, template[i].ilen);
510 memcpy(assoc, template[i].assoc, template[i].alen); 512 memcpy(assoc, template[i].assoc, template[i].alen);
511 iv_len = crypto_aead_ivsize(tfm);
512 if (template[i].iv) 513 if (template[i].iv)
513 memcpy(iv, template[i].iv, iv_len); 514 memcpy(iv, template[i].iv, iv_len);
514 else 515 else
@@ -617,7 +618,7 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
617 j++; 618 j++;
618 619
619 if (template[i].iv) 620 if (template[i].iv)
620 memcpy(iv, template[i].iv, MAX_IVLEN); 621 memcpy(iv, template[i].iv, iv_len);
621 else 622 else
622 memset(iv, 0, MAX_IVLEN); 623 memset(iv, 0, MAX_IVLEN);
623 624
@@ -3214,6 +3215,21 @@ static const struct alg_test_desc alg_test_descs[] = {
3214 } 3215 }
3215 } 3216 }
3216 }, { 3217 }, {
3218 .alg = "heh(aes)",
3219 .test = alg_test_skcipher,
3220 .suite = {
3221 .cipher = {
3222 .enc = {
3223 .vecs = aes_heh_enc_tv_template,
3224 .count = AES_HEH_ENC_TEST_VECTORS
3225 },
3226 .dec = {
3227 .vecs = aes_heh_dec_tv_template,
3228 .count = AES_HEH_DEC_TEST_VECTORS
3229 }
3230 }
3231 }
3232 }, {
3217 .alg = "hmac(crc32)", 3233 .alg = "hmac(crc32)",
3218 .test = alg_test_hash, 3234 .test = alg_test_hash,
3219 .suite = { 3235 .suite = {