Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/crypto/blowfish Pull up revision 1.8 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/0c8093107c58
branches:  netbsd-1-6
changeset: 530712:0c8093107c58
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Sep 12 19:14:06 2003 +0000

description:
Pull up revision 1.8 (requested by tv in ticket #1455):
Modified to avoid compiler warnings.  The specific warning related
to const BF_KEY * vars, and I chose to ``fix'' it in this file
rather than elsewhere in the framework because, although the other
fix was more appropriate, nothing seems to use the code in this
file and hence the risk of disrupting other people was lower.  In
the future, the more appropriate change would be to change blowfish.h
and bf_enc.c to have functions with signatures:
BF_encrypt(BF_LONG *, const BF_KEY *);
BF_decrypt(BF_LONG *, const BF_KEY *);

diffstat:

 sys/crypto/blowfish/bf_cbc.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r d471bb28f929 -r 0c8093107c58 sys/crypto/blowfish/bf_cbc.c
--- a/sys/crypto/blowfish/bf_cbc.c      Fri Sep 12 19:13:11 2003 +0000
+++ b/sys/crypto/blowfish/bf_cbc.c      Fri Sep 12 19:14:06 2003 +0000
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bf_cbc.c,v 1.5.10.2 2003/09/12 19:12:06 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bf_cbc.c,v 1.5.10.3 2003/09/12 19:14:06 tron Exp $");
 
 #include <sys/types.h>
 
@@ -85,7 +85,7 @@
                        tin1^=tout1;
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,schedule);
+                       BF_encrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0];
                        tout1=tin[1];
                        l2n(tout0,out);
@@ -98,7 +98,7 @@
                        tin1^=tout1;
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,schedule);
+                       BF_encrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0];
                        tout1=tin[1];
                        l2n(tout0,out);
@@ -118,7 +118,7 @@
                        n2l(in,tin1);
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_decrypt(tin,schedule);
+                       BF_decrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2n(tout0,out);
@@ -132,7 +132,7 @@
                        n2l(in,tin1);
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_decrypt(tin,schedule);
+                       BF_decrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2nn(tout0,tout1,out,l+8);



Home | Main Index | Thread Index | Old Index