Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/opencrypto Fix-up a few things missed in the rijndael_se...



details:   https://anonhg.NetBSD.org/src/rev/d0feabc06b1d
branches:  trunk
changeset: 551018:d0feabc06b1d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Aug 27 14:55:36 2003 +0000

description:
Fix-up a few things missed in the rijndael_set_key() change.

diffstat:

 sys/opencrypto/xform.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r f83686fe2357 -r d0feabc06b1d sys/opencrypto/xform.c
--- a/sys/opencrypto/xform.c    Wed Aug 27 14:49:44 2003 +0000
+++ b/sys/opencrypto/xform.c    Wed Aug 27 14:55:36 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform.c,v 1.10 2003/08/27 14:23:28 itojun Exp $ */
+/*     $NetBSD: xform.c,v 1.11 2003/08/27 14:55:36 thorpej Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $    */
 /*     $OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $     */
 
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform.c,v 1.10 2003/08/27 14:23:28 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform.c,v 1.11 2003/08/27 14:55:36 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -540,7 +540,7 @@
 static void
 rijndael128_decrypt(caddr_t key, u_int8_t *blk)
 {
-       rijndael_decrypt(((rijndael_ctx *) key) + 1, (u_char *) blk,
+       rijndael_decrypt((rijndael_ctx *) key, (u_char *) blk,
            (u_char *) blk);
 }
 
@@ -552,8 +552,8 @@
        MALLOC(*sched, u_int8_t *, sizeof(rijndael_ctx), M_CRYPTO_DATA,
            M_WAITOK);
        if (*sched != NULL) {
-               bzero(*sched, 2 * sizeof(rijndael_ctx));
-               rijndael_set_key((rijndael_ctx *) *sched, (u_char *) key, len * 8);
+               bzero(*sched, sizeof(rijndael_ctx));
+               rijndael_set_key((rijndael_ctx *) *sched, key, len * 8);
                err = 0;
        } else
                err = ENOMEM;



Home | Main Index | Thread Index | Old Index