libmcrypt: add

This commit is contained in:
suvari
2016-02-27 00:17:14 +02:00
parent 107a071f18
commit d9b3b0246c
6 changed files with 181 additions and 0 deletions
@@ -0,0 +1,35 @@
diff -up libmcrypt-2.5.8/Makefile.in.orig libmcrypt-2.5.8/Makefile.in
--- libmcrypt-2.5.8/Makefile.in.orig 2007-02-19 00:32:38.000000000 -0600
+++ libmcrypt-2.5.8/Makefile.in 2007-07-19 21:23:39.000000000 -0500
@@ -209,8 +209,8 @@ target_os = @target_os@
target_vendor = @target_vendor@
INCLUDES = $(INCLTDL)
EXTRA_DIST = KNOWN-BUGS THANKS NEWS libmcrypt.spec.in libmcrypt.spec COPYING.LIB
-DIST_SUBDIRS = libltdl modules include lib src doc
-SUBDIRS = $(LIBLTDL_DIR) modules include lib src doc
+DIST_SUBDIRS = modules include lib src doc
+SUBDIRS = modules include lib src doc
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
diff -up libmcrypt-2.5.8/configure.orig libmcrypt-2.5.8/configure
--- libmcrypt-2.5.8/configure.orig 2007-02-19 00:32:39.000000000 -0600
+++ libmcrypt-2.5.8/configure 2007-07-19 21:21:38.000000000 -0500
@@ -426,7 +426,7 @@ PACKAGE_STRING=
PACKAGE_BUGREPORT=
ac_unique_file="lib/mcrypt.c"
-ac_subdirs_all="$ac_subdirs_all libltdl"
+ac_subdirs_all="$ac_subdirs_all"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -4425,7 +4425,7 @@ fi
-subdirs="$subdirs libltdl"
+subdirs="$subdirs"
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
@@ -0,0 +1,35 @@
diff -up libmcrypt-2.5.8/modules/algorithms/des.c.BAD libmcrypt-2.5.8/modules/algorithms/des.c
--- libmcrypt-2.5.8/modules/algorithms/des.c.BAD 2008-08-25 17:40:29.000000000 -0400
+++ libmcrypt-2.5.8/modules/algorithms/des.c 2008-08-25 17:40:51.000000000 -0400
@@ -35,9 +35,12 @@
/* #define NULL 0 */
-static void permute_ip(), permute_fp(), perminit_ip(), spinit(),
-perminit_fp();
-static word32 f();
+static void permute_ip(char *, DES_KEY *, char *);
+static void permute_fp(char *, DES_KEY *, char *);
+static void perminit_ip(DES_KEY *);
+static void spinit(DES_KEY *);
+static void perminit_fp(DES_KEY *);
+static word32 f(DES_KEY *, register word32, register char *);
/* Tables defined in the Data Encryption Standard documents */
diff -up libmcrypt-2.5.8/modules/algorithms/tripledes.c.BAD libmcrypt-2.5.8/modules/algorithms/tripledes.c
--- libmcrypt-2.5.8/modules/algorithms/tripledes.c.BAD 2008-08-25 17:40:56.000000000 -0400
+++ libmcrypt-2.5.8/modules/algorithms/tripledes.c 2008-08-25 17:41:13.000000000 -0400
@@ -36,8 +36,10 @@
/* #define NULL 0 */
-static void permute(), perminit(), spinit();
-static word32 f();
+static void permute(char *, char[16][16][8], char *);
+static void perminit(char[16][16][8], char[64]);
+static void spinit(TRIPLEDES_KEY *, int);
+static word32 f(TRIPLEDES_KEY *, int, register word32, register char *);
/* Tables defined in the Data Encryption Standard documents */
@@ -0,0 +1,12 @@
diff -up libmcrypt-2.5.8/modules/algorithms/twofish.c.BAD libmcrypt-2.5.8/modules/algorithms/twofish.c
--- libmcrypt-2.5.8/modules/algorithms/twofish.c.BAD 2008-08-25 17:38:21.000000000 -0400
+++ libmcrypt-2.5.8/modules/algorithms/twofish.c 2008-08-25 17:38:30.000000000 -0400
@@ -499,7 +499,7 @@ static void f_rnd(int i, word32* blk, TW
/* encrypt a block of text */
WIN32DLL_DEFINE void _mcrypt_encrypt(TWI * pkey, word32 * in_blk)
{
- word32 t0, t1, blk[4];
+ word32 t0 = 0, t1 = 0, blk[4];
#ifdef WORDS_BIGENDIAN
blk[0] = byteswap32(in_blk[0]) ^ pkey->l_key[0];
blk[1] = byteswap32(in_blk[1]) ^ pkey->l_key[1];