Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148819
b: refs/heads/master
c: a0cfae5
h: refs/heads/master
i:
  148817: be0f8bd
  148815: 15aaa08
v: v3
  • Loading branch information
Herbert Xu committed Jun 2, 2009
1 parent 5d9c3d0 commit 06bd976
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd57f22a09ae276ca3e9cd11ed99b617d611ba82
refs/heads/master: a0cfae59f8381c5c670fce2cc3de70b35421f920
11 changes: 8 additions & 3 deletions trunk/crypto/testmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ static int test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
tcrypt_complete, &tresult);

j = 0;
for (i = 0; i < tcount; i++) {
if (template[i].np)
continue;

j++;
memset(result, 0, 64);

hash_buff = xbuf[0];
Expand All @@ -198,7 +203,7 @@ static int test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
template[i].ksize);
if (ret) {
printk(KERN_ERR "alg: hash: setkey failed on "
"test %d for %s: ret=%d\n", i + 1, algo,
"test %d for %s: ret=%d\n", j, algo,
-ret);
goto out;
}
Expand All @@ -220,14 +225,14 @@ static int test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
/* fall through */
default:
printk(KERN_ERR "alg: hash: digest failed on test %d "
"for %s: ret=%d\n", i + 1, algo, -ret);
"for %s: ret=%d\n", j, algo, -ret);
goto out;
}

if (memcmp(result, template[i].digest,
crypto_ahash_digestsize(tfm))) {
printk(KERN_ERR "alg: hash: Test %d failed for %s\n",
i + 1, algo);
j, algo);
hexdump(result, crypto_ahash_digestsize(tfm));
ret = -EINVAL;
goto out;
Expand Down

0 comments on commit 06bd976

Please sign in to comment.