shishi-commit
[Top][All Lists]
Advanced

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

shishi/lib crypto-des.c crypto.c crypto.h


From: shishi-commit
Subject: shishi/lib crypto-des.c crypto.c crypto.h
Date: Sat, 20 Sep 2003 05:50:09 -0400

CVSROOT:        /cvsroot/shishi
Module name:    shishi
Branch:         
Changes by:     Simon Josefsson <address@hidden>        03/09/20 05:50:09

Modified files:
        lib            : crypto-des.c crypto.c crypto.h 

Log message:
        Fix CRC32 checksum, from Nicolas Pouvesle <address@hidden>.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/lib/crypto-des.c.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/lib/crypto.c.diff?tr1=1.86&tr2=1.87&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/lib/crypto.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: shishi/lib/crypto-des.c
diff -u shishi/lib/crypto-des.c:1.53 shishi/lib/crypto-des.c:1.54
--- shishi/lib/crypto-des.c:1.53        Fri Sep 19 19:49:58 2003
+++ shishi/lib/crypto-des.c     Sat Sep 20 05:50:08 2003
@@ -667,6 +667,17 @@
 }
 
 static int
+des_crc_checksum (Shishi * handle,
+                 Shishi_key * key,
+                 int keyusage,
+                 int cksumtype,
+                 const char *in, size_t inlen, char **out, size_t * outlen)
+{
+  return des_checksum (handle, key, keyusage, cksumtype,
+                      in, inlen, out, outlen, SHISHI_DES_CBC_CRC);
+}
+
+static int
 des_md4_checksum (Shishi * handle,
                  Shishi_key * key,
                  int keyusage,
@@ -816,7 +827,7 @@
   8,
   8,
   8,
-  SHISHI_RSA_MD5_DES,
+  SHISHI_CRC32,
   des_random_to_key,
   des_string_to_key,
   des_crc_encrypt,
@@ -866,6 +877,13 @@
   des_string_to_key,
   des_none_encrypt,
   des_none_decrypt
+};
+
+checksuminfo crc32_info = {
+  SHISHI_CRC32,
+  "crc32",
+  4,
+  des_crc_checksum,
 };
 
 checksuminfo md4_des_info = {
Index: shishi/lib/crypto.c
diff -u shishi/lib/crypto.c:1.86 shishi/lib/crypto.c:1.87
--- shishi/lib/crypto.c:1.86    Fri Sep 19 19:49:59 2003
+++ shishi/lib/crypto.c Sat Sep 20 05:50:09 2003
@@ -709,6 +709,9 @@
 }
 
 static checksuminfo *checksums[] = {
+#if WITH_DES
+  &crc32_info,
+#endif
 #if WITH_MD
   &md4_info,
 #endif
Index: shishi/lib/crypto.h
diff -u shishi/lib/crypto.h:1.2 shishi/lib/crypto.h:1.3
--- shishi/lib/crypto.h:1.2     Sat Sep 13 20:59:51 2003
+++ shishi/lib/crypto.h Sat Sep 20 05:50:09 2003
@@ -138,6 +138,7 @@
 
 extern cipherinfo null_info;
 
+extern checksuminfo crc32_info;
 extern checksuminfo md4_info;
 extern checksuminfo md5_info;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]