Fix FTBFS (#1307740)
parent
85c66e7b15
commit
20358c51c4
@ -1 +1,2 @@
|
||||
crypt-1.17.tar.bz2
|
||||
/libtomcrypt-912eff4.tar.gz
|
||||
|
@ -1,17 +0,0 @@
|
||||
--- libtomcrypt-1.17.orig/makefile.shared 2007-05-12 08:46:25.000000000 -0600
|
||||
+++ libtomcrypt-1.17/makefile.shared 2007-06-27 21:56:29.000000000 -0600
|
||||
@@ -29,10 +29,12 @@
|
||||
ifndef IGNORE_SPEED
|
||||
|
||||
# optimize for SPEED
|
||||
-CFLAGS += -O3 -funroll-loops
|
||||
+# removed for building in Fedora
|
||||
+#CFLAGS += -O3 -funroll-loops
|
||||
|
||||
# add -fomit-frame-pointer. hinders debugging!
|
||||
-CFLAGS += -fomit-frame-pointer
|
||||
+# removed for building in Fedora
|
||||
+#CFLAGS += -fomit-frame-pointer
|
||||
|
||||
# optimize for SIZE
|
||||
#CFLAGS += -Os -DLTC_SMALL_CODE
|
@ -1,34 +0,0 @@
|
||||
--- libtomcrypt-1.17.orig/makefile.shared
|
||||
+++ libtomcrypt-1.17/makefile.shared
|
||||
@@ -248,15 +248,16 @@
|
||||
|
||||
objs: $(OBJECTS)
|
||||
|
||||
-$(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
|
||||
+$(LIBNAME): $(OBJECTS)
|
||||
libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
|
||||
|
||||
install: $(LIBNAME)
|
||||
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
|
||||
- cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
|
||||
libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
|
||||
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
|
||||
install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
|
||||
+ install -d $(DESTDIR)$(LIBPATH)/pkgconfig
|
||||
+ install -m 0644 -g $(GROUP) -o $(USER) libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc
|
||||
|
||||
#This rule makes the hash program included with libtomcrypt
|
||||
hashsum: library
|
||||
--- libtomcrypt-1.17.orig/libtomcrypt.pc
|
||||
+++ libtomcrypt-1.17/libtomcrypt.pc
|
||||
@@ -0,0 +1,10 @@
|
||||
+prefix=/usr
|
||||
+exec_prefix=${prefix}
|
||||
+libdir=${exec_prefix}/lib
|
||||
+includedir=${prefix}/include
|
||||
+
|
||||
+Name: LibTomCrypt
|
||||
+Description: public domain open source cryptographic toolkit
|
||||
+Version: 1.17
|
||||
+Libs: -L${libdir} -ltomcrypt
|
||||
+Cflags: -I${includedir}
|
@ -1,53 +0,0 @@
|
||||
From 445dfa67a64dcd30067dab823f6bae31d1019c1e Mon Sep 17 00:00:00 2001
|
||||
From: Paul Howarth <paul@city-fan.org>
|
||||
Date: Tue, 15 Apr 2014 11:25:18 +0100
|
||||
Subject: [PATCH] des.c: Add support for two-key Triple-DES
|
||||
|
||||
Add two-key 3DES support, needed by pycrypto.
|
||||
|
||||
This commit is based on the one for the bundled libtomcrypt 1.16
|
||||
code in pycrypto:
|
||||
|
||||
https://github.com/dlitz/pycrypto/commit/65085f16
|
||||
---
|
||||
src/ciphers/des.c | 16 +++++++++++++---
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/ciphers/des.c b/src/ciphers/des.c
|
||||
index af3a4d0..0034c80 100644
|
||||
--- a/src/ciphers/des.c
|
||||
+++ b/src/ciphers/des.c
|
||||
@@ -1562,17 +1562,27 @@ int des3_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_k
|
||||
return CRYPT_INVALID_ROUNDS;
|
||||
}
|
||||
|
||||
- if (keylen != 24) {
|
||||
+ if (keylen != 24 && keylen != 16) {
|
||||
return CRYPT_INVALID_KEYSIZE;
|
||||
}
|
||||
|
||||
deskey(key, EN0, skey->des3.ek[0]);
|
||||
deskey(key+8, DE1, skey->des3.ek[1]);
|
||||
- deskey(key+16, EN0, skey->des3.ek[2]);
|
||||
+ if (keylen == 24) {
|
||||
+ deskey(key+16, EN0, skey->des3.ek[2]);
|
||||
+ } else {
|
||||
+ /* two-key 3DES: K3=K1 */
|
||||
+ deskey(key, EN0, skey->des3.ek[2]);
|
||||
+ }
|
||||
|
||||
deskey(key, DE1, skey->des3.dk[2]);
|
||||
deskey(key+8, EN0, skey->des3.dk[1]);
|
||||
- deskey(key+16, DE1, skey->des3.dk[0]);
|
||||
+ if (keylen == 24) {
|
||||
+ deskey(key+16, DE1, skey->des3.dk[0]);
|
||||
+ } else {
|
||||
+ /* two-key 3DES: K3=K1 */
|
||||
+ deskey(key, DE1, skey->des3.dk[0]);
|
||||
+ }
|
||||
|
||||
return CRYPT_OK;
|
||||
}
|
||||
--
|
||||
1.9.0
|
||||
|
Loading…
Reference in new issue