Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/netinet6 Pullup 1.13 and 1.14 [itojun]:



details:   https://anonhg.NetBSD.org/src/rev/4bb2ef14a220
branches:  netbsd-1-5
changeset: 490117:4bb2ef14a220
user:      tv <tv%NetBSD.org@localhost>
date:      Fri Nov 03 18:45:15 2000 +0000

description:
Pullup 1.13 and 1.14 [itojun]:
[13]des fix for big endian machines.  from: shigeru%iij.ad.jp@localhost
avoid possible align issue

diffstat:

 sys/netinet6/esp_core.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (59 lines):

diff -r 4a7fb2d3cc39 -r 4bb2ef14a220 sys/netinet6/esp_core.c
--- a/sys/netinet6/esp_core.c   Fri Nov 03 18:43:18 2000 +0000
+++ b/sys/netinet6/esp_core.c   Fri Nov 03 18:45:15 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: esp_core.c,v 1.1.1.1.2.6 2000/10/05 14:51:57 itojun Exp $      */
-/*     $KAME: esp_core.c,v 1.46 2000/10/05 04:02:57 itojun Exp $       */
+/*     $NetBSD: esp_core.c,v 1.1.1.1.2.7 2000/11/03 18:45:15 tv Exp $  */
+/*     $KAME: esp_core.c,v 1.50 2000/11/02 12:27:38 itojun Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -351,8 +351,8 @@
 
        /* assumption: d has a good alignment */
        bcopy(s, d, sizeof(DES_LONG) * 2);
-       des_encrypt((DES_LONG *)d, *(des_key_schedule *)sav->sched,
-           DES_DECRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d,
+           *(des_key_schedule *)sav->sched, DES_DECRYPT);
        return 0;
 }
 
@@ -366,8 +366,8 @@
 
        /* assumption: d has a good alignment */
        bcopy(s, d, sizeof(DES_LONG) * 2);
-       des_encrypt((DES_LONG *)d, *(des_key_schedule *)sav->sched,
-           DES_ENCRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d,
+           *(des_key_schedule *)sav->sched, DES_ENCRYPT);
        return 0;
 }
 
@@ -586,9 +586,9 @@
        /* assumption: d has a good alignment */
        p = (des_key_schedule *)sav->sched;
        bcopy(s, d, sizeof(DES_LONG) * 2);
-       des_encrypt((DES_LONG *)d, p[2], DES_DECRYPT);
-       des_encrypt((DES_LONG *)d, p[1], DES_ENCRYPT);
-       des_encrypt((DES_LONG *)d, p[0], DES_DECRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d, p[2], DES_DECRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d, p[1], DES_ENCRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d, p[0], DES_DECRYPT);
        return 0;
 }
 
@@ -604,9 +604,9 @@
        /* assumption: d has a good alignment */
        p = (des_key_schedule *)sav->sched;
        bcopy(s, d, sizeof(DES_LONG) * 2);
-       des_encrypt((DES_LONG *)d, p[0], DES_ENCRYPT);
-       des_encrypt((DES_LONG *)d, p[1], DES_DECRYPT);
-       des_encrypt((DES_LONG *)d, p[2], DES_ENCRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d, p[0], DES_ENCRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d, p[1], DES_DECRYPT);
+       des_ecb_encrypt((des_cblock *)d, (des_cblock *)d, p[2], DES_ENCRYPT);
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index