Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108344
b: refs/heads/master
c: f176e63
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu committed Aug 13, 2008
1 parent 47ca4e5 commit 3ff793f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 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: f3c85bc1bc72b4cc8d58664a490a9d42bdb6565a
refs/heads/master: f176e632efad33aeb2d3c5ddfa86861c0d60553c
28 changes: 19 additions & 9 deletions trunk/crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,21 +481,31 @@ static void test_aead(char *algo, int enc, struct aead_testvec *template,

for (k = 0, temp = 0; k < template[i].np; k++) {
printk(KERN_INFO "page %u\n", k);
q = &axbuf[IDX[k]];
hexdump(q, template[i].tap[k]);
q = &xbuf[IDX[k]];

n = template[i].tap[k];
if (k == template[i].np - 1)
n += enc ? authsize : -authsize;
hexdump(q, n);
printk(KERN_INFO "%s\n",
memcmp(q, template[i].result + temp,
template[i].tap[k] -
(k < template[i].np - 1 || enc ?
0 : authsize)) ?
memcmp(q, template[i].result + temp, n) ?
"fail" : "pass");

for (n = 0; q[template[i].tap[k] + n]; n++)
;
q += n;
if (k == template[i].np - 1 && !enc) {
if (memcmp(q, template[i].input +
temp + n, authsize))
n = authsize;
else
n = 0;
} else {
for (n = 0; q[n]; n++)
;
}
if (n) {
printk("Result buffer corruption %u "
"bytes:\n", n);
hexdump(&q[template[i].tap[k]], n);
hexdump(q, n);
}

temp += template[i].tap[k];
Expand Down

0 comments on commit 3ff793f

Please sign in to comment.