[package] add libcrypto++, required for the new amule version
authorFlorian Fainelli <florian@openwrt.org>
Sun, 27 Sep 2009 21:05:00 +0000 (21:05 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 27 Sep 2009 21:05:00 +0000 (21:05 +0000)
SVN-Revision: 17771

libs/libcrypto++/Makefile [new file with mode: 0644]
libs/libcrypto++/patches/001-strict_gcc43_include.patch [new file with mode: 0644]
libs/libcrypto++/patches/002-cryptest_data_files_location.patch [new file with mode: 0644]
libs/libcrypto++/patches/003-autoconf_files.patch [new file with mode: 0644]

diff --git a/libs/libcrypto++/Makefile b/libs/libcrypto++/Makefile
new file mode 100644 (file)
index 0000000..5ae4785
--- /dev/null
@@ -0,0 +1,63 @@
+# 
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcrypto++
+PKG_VERSION:=5.6.0
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
+PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/libc/libcrypto++/
+PKG_MD5SUM:=
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcryptoxx
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libpthread
+  TITLE:=Crypto++ is library for creating C++ programs which use cryptographic algorithms
+  URL:=http://packages.debian.org/sid/libcrypto++-dev
+endef
+
+define Package/package/libcryptoxx
+  Crypto++ is library for creating C++ programs which use cryptographic algorithms.
+  The library uses a Pipes & Filters architecture with heavy use of templates and
+  abstract base classes.
+endef
+
+CONFIGURE_ARGS += \
+       --enable-static \
+       --enable-shared
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); rm -f config.cache GNUmakefile; autoreconf --force --install)
+       $(call Build/Configure/Default,,\
+               LDFLAGS="$(TARGET_LDFLAGS) -lpthread" \
+       )
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
+endef
+
+
+define Build/InstallDev
+       mkdir -p $(1)/usr/include/crypto++
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/crypto--/* $(1)/usr/include/crypto++/
+       mkdir -p $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypto++.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libcryptoxx/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypto++.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libcryptoxx))
diff --git a/libs/libcrypto++/patches/001-strict_gcc43_include.patch b/libs/libcrypto++/patches/001-strict_gcc43_include.patch
new file mode 100644 (file)
index 0000000..f8c38eb
--- /dev/null
@@ -0,0 +1,16 @@
+## strict-gcc43-include.diff by Jens Peter Secher <jps@debian.org>
+##
+## Explicitly include cstring to allow compilation with GCC 4.3.
+
+Index: libcrypto++/misc.h
+===================================================================
+--- libcrypto++.orig/misc.h    2009-04-07 02:48:55.000000000 +0200
++++ libcrypto++/misc.h 2009-04-07 02:50:56.000000000 +0200
+@@ -40,6 +40,7 @@
+ #if defined(__GNUC__) && defined(__linux__)
+ #define CRYPTOPP_BYTESWAP_AVAILABLE
+ #include <byteswap.h>
++#include <cstring>
+ #endif
+ NAMESPACE_BEGIN(CryptoPP)
diff --git a/libs/libcrypto++/patches/002-cryptest_data_files_location.patch b/libs/libcrypto++/patches/002-cryptest_data_files_location.patch
new file mode 100644 (file)
index 0000000..2dbb696
--- /dev/null
@@ -0,0 +1,500 @@
+## cryptest-data-files-location.diff by Jens Peter Secher <jps@debian.org>
+##
+## Prefix data file names by PACKAGE_DATA_DIR which is set during build.
+
+Index: libcrypto++/bench2.cpp
+===================================================================
+--- libcrypto++.orig/bench2.cpp        2009-04-07 03:08:36.000000000 +0200
++++ libcrypto++/bench2.cpp     2009-04-07 03:23:43.000000000 +0200
+@@ -245,44 +245,44 @@
+       cout << "<THEAD><TR><TH>Operation<TH>Milliseconds/Operation" << (g_hertz ? "<TH>Megacycles/Operation" : "") << endl;
+       cout << "\n<TBODY style=\"background: yellow\">";
+-      BenchMarkCrypto<RSAES<OAEP<SHA> > >("TestData/rsa1024.dat", "RSA 1024", t);
+-      BenchMarkCrypto<LUCES<OAEP<SHA> > >("TestData/luc1024.dat", "LUC 1024", t);
+-      BenchMarkCrypto<DLIES<> >("TestData/dlie1024.dat", "DLIES 1024", t);
+-      BenchMarkCrypto<LUC_IES<> >("TestData/lucc512.dat", "LUCELG 512", t);
++      BenchMarkCrypto<RSAES<OAEP<SHA> > >(PACKAGE_DATA_DIR "TestData/rsa1024.dat", "RSA 1024", t);
++      BenchMarkCrypto<LUCES<OAEP<SHA> > >(PACKAGE_DATA_DIR "TestData/luc1024.dat", "LUC 1024", t);
++      BenchMarkCrypto<DLIES<> >(PACKAGE_DATA_DIR "TestData/dlie1024.dat", "DLIES 1024", t);
++      BenchMarkCrypto<LUC_IES<> >(PACKAGE_DATA_DIR "TestData/lucc512.dat", "LUCELG 512", t);
+       cout << "\n<TBODY style=\"background: white\">";
+-      BenchMarkCrypto<RSAES<OAEP<SHA> > >("TestData/rsa2048.dat", "RSA 2048", t);
+-      BenchMarkCrypto<LUCES<OAEP<SHA> > >("TestData/luc2048.dat", "LUC 2048", t);
+-      BenchMarkCrypto<DLIES<> >("TestData/dlie2048.dat", "DLIES 2048", t);
+-      BenchMarkCrypto<LUC_IES<> >("TestData/lucc1024.dat", "LUCELG 1024", t);
++      BenchMarkCrypto<RSAES<OAEP<SHA> > >(PACKAGE_DATA_DIR "TestData/rsa2048.dat", "RSA 2048", t);
++      BenchMarkCrypto<LUCES<OAEP<SHA> > >(PACKAGE_DATA_DIR "TestData/luc2048.dat", "LUC 2048", t);
++      BenchMarkCrypto<DLIES<> >(PACKAGE_DATA_DIR "TestData/dlie2048.dat", "DLIES 2048", t);
++      BenchMarkCrypto<LUC_IES<> >(PACKAGE_DATA_DIR "TestData/lucc1024.dat", "LUCELG 1024", t);
+       cout << "\n<TBODY style=\"background: yellow\">";
+-      BenchMarkSignature<RSASS<PSSR, SHA> >("TestData/rsa1024.dat", "RSA 1024", t);
+-      BenchMarkSignature<RWSS<PSSR, SHA> >("TestData/rw1024.dat", "RW 1024", t);
+-      BenchMarkSignature<LUCSS<PSSR, SHA> >("TestData/luc1024.dat", "LUC 1024", t);
+-      BenchMarkSignature<NR<SHA> >("TestData/nr1024.dat", "NR 1024", t);
+-      BenchMarkSignature<DSA>("TestData/dsa1024.dat", "DSA 1024", t);
+-      BenchMarkSignature<LUC_HMP<SHA> >("TestData/lucs512.dat", "LUC-HMP 512", t);
+-      BenchMarkSignature<ESIGN<SHA> >("TestData/esig1023.dat", "ESIGN 1023", t);
+-      BenchMarkSignature<ESIGN<SHA> >("TestData/esig1536.dat", "ESIGN 1536", t);
++      BenchMarkSignature<RSASS<PSSR, SHA> >(PACKAGE_DATA_DIR "TestData/rsa1024.dat", "RSA 1024", t);
++      BenchMarkSignature<RWSS<PSSR, SHA> >(PACKAGE_DATA_DIR "TestData/rw1024.dat", "RW 1024", t);
++      BenchMarkSignature<LUCSS<PSSR, SHA> >(PACKAGE_DATA_DIR "TestData/luc1024.dat", "LUC 1024", t);
++      BenchMarkSignature<NR<SHA> >(PACKAGE_DATA_DIR "TestData/nr1024.dat", "NR 1024", t);
++      BenchMarkSignature<DSA>(PACKAGE_DATA_DIR "TestData/dsa1024.dat", "DSA 1024", t);
++      BenchMarkSignature<LUC_HMP<SHA> >(PACKAGE_DATA_DIR "TestData/lucs512.dat", "LUC-HMP 512", t);
++      BenchMarkSignature<ESIGN<SHA> >(PACKAGE_DATA_DIR "TestData/esig1023.dat", "ESIGN 1023", t);
++      BenchMarkSignature<ESIGN<SHA> >(PACKAGE_DATA_DIR "TestData/esig1536.dat", "ESIGN 1536", t);
+       cout << "\n<TBODY style=\"background: white\">";
+-      BenchMarkSignature<RSASS<PSSR, SHA> >("TestData/rsa2048.dat", "RSA 2048", t);
+-      BenchMarkSignature<RWSS<PSSR, SHA> >("TestData/rw2048.dat", "RW 2048", t);
+-      BenchMarkSignature<LUCSS<PSSR, SHA> >("TestData/luc2048.dat", "LUC 2048", t);
+-      BenchMarkSignature<NR<SHA> >("TestData/nr2048.dat", "NR 2048", t);
+-      BenchMarkSignature<LUC_HMP<SHA> >("TestData/lucs1024.dat", "LUC-HMP 1024", t);
+-      BenchMarkSignature<ESIGN<SHA> >("TestData/esig2046.dat", "ESIGN 2046", t);
++      BenchMarkSignature<RSASS<PSSR, SHA> >(PACKAGE_DATA_DIR "TestData/rsa2048.dat", "RSA 2048", t);
++      BenchMarkSignature<RWSS<PSSR, SHA> >(PACKAGE_DATA_DIR "TestData/rw2048.dat", "RW 2048", t);
++      BenchMarkSignature<LUCSS<PSSR, SHA> >(PACKAGE_DATA_DIR "TestData/luc2048.dat", "LUC 2048", t);
++      BenchMarkSignature<NR<SHA> >(PACKAGE_DATA_DIR "TestData/nr2048.dat", "NR 2048", t);
++      BenchMarkSignature<LUC_HMP<SHA> >(PACKAGE_DATA_DIR "TestData/lucs1024.dat", "LUC-HMP 1024", t);
++      BenchMarkSignature<ESIGN<SHA> >(PACKAGE_DATA_DIR "TestData/esig2046.dat", "ESIGN 2046", t);
+       cout << "\n<TBODY style=\"background: yellow\">";
+-      BenchMarkKeyAgreement<XTR_DH>("TestData/xtrdh171.dat", "XTR-DH 171", t);
+-      BenchMarkKeyAgreement<XTR_DH>("TestData/xtrdh342.dat", "XTR-DH 342", t);
+-      BenchMarkKeyAgreement<DH>("TestData/dh1024.dat", "DH 1024", t);
+-      BenchMarkKeyAgreement<DH>("TestData/dh2048.dat", "DH 2048", t);
+-      BenchMarkKeyAgreement<LUC_DH>("TestData/lucd512.dat", "LUCDIF 512", t);
+-      BenchMarkKeyAgreement<LUC_DH>("TestData/lucd1024.dat", "LUCDIF 1024", t);
+-      BenchMarkKeyAgreement<MQV>("TestData/mqv1024.dat", "MQV 1024", t);
+-      BenchMarkKeyAgreement<MQV>("TestData/mqv2048.dat", "MQV 2048", t);
++      BenchMarkKeyAgreement<XTR_DH>(PACKAGE_DATA_DIR "TestData/xtrdh171.dat", "XTR-DH 171", t);
++      BenchMarkKeyAgreement<XTR_DH>(PACKAGE_DATA_DIR "TestData/xtrdh342.dat", "XTR-DH 342", t);
++      BenchMarkKeyAgreement<DH>(PACKAGE_DATA_DIR "TestData/dh1024.dat", "DH 1024", t);
++      BenchMarkKeyAgreement<DH>(PACKAGE_DATA_DIR "TestData/dh2048.dat", "DH 2048", t);
++      BenchMarkKeyAgreement<LUC_DH>(PACKAGE_DATA_DIR "TestData/lucd512.dat", "LUCDIF 512", t);
++      BenchMarkKeyAgreement<LUC_DH>(PACKAGE_DATA_DIR "TestData/lucd1024.dat", "LUCDIF 1024", t);
++      BenchMarkKeyAgreement<MQV>(PACKAGE_DATA_DIR "TestData/mqv1024.dat", "MQV 1024", t);
++      BenchMarkKeyAgreement<MQV>(PACKAGE_DATA_DIR "TestData/mqv2048.dat", "MQV 2048", t);
+       cout << "\n<TBODY style=\"background: white\">";
+       {
+Index: libcrypto++/test.cpp
+===================================================================
+--- libcrypto++.orig/test.cpp  2009-04-07 03:08:36.000000000 +0200
++++ libcrypto++/test.cpp       2009-04-07 03:24:04.000000000 +0200
+@@ -337,7 +337,7 @@
+                       AES_CTR_Encrypt(argv[2], argv[3], argv[4], argv[5]);
+               else if (command == "h")
+               {
+-                      FileSource usage("TestData/usage.dat", true, new FileSink(cout));
++                      FileSource usage(PACKAGE_DATA_DIR "TestData/usage.dat", true, new FileSink(cout));
+                       return 1;
+               }
+               else if (command == "V")
+Index: libcrypto++/validat1.cpp
+===================================================================
+--- libcrypto++.orig/validat1.cpp      2009-04-07 03:08:36.000000000 +0200
++++ libcrypto++/validat1.cpp   2009-04-07 03:25:57.000000000 +0200
+@@ -508,12 +508,12 @@
+ {
+       cout << "\nDES validation suite running...\n\n";
+-      FileSource valdata("TestData/descert.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/descert.dat", true, new HexDecoder);
+       bool pass = BlockTransformationTest(FixedRoundsCipherFactory<DESEncryption, DESDecryption>(), valdata);
+       cout << "\nTesting EDE2, EDE3, and XEX3 variants...\n\n";
+-      FileSource valdata1("TestData/3desval.dat", true, new HexDecoder);
++      FileSource valdata1(PACKAGE_DATA_DIR "TestData/3desval.dat", true, new HexDecoder);
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<DES_EDE2_Encryption, DES_EDE2_Decryption>(), valdata1, 1) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<DES_EDE3_Encryption, DES_EDE3_Decryption>(), valdata1, 1) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<DES_XEX3_Encryption, DES_XEX3_Decryption>(), valdata1, 1) && pass;
+@@ -855,7 +855,7 @@
+ {
+       cout << "\nIDEA validation suite running...\n\n";
+-      FileSource valdata("TestData/ideaval.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/ideaval.dat", true, new HexDecoder);
+       return BlockTransformationTest(FixedRoundsCipherFactory<IDEAEncryption, IDEADecryption>(), valdata);
+ }
+@@ -863,7 +863,7 @@
+ {
+       cout << "\nSAFER validation suite running...\n\n";
+-      FileSource valdata("TestData/saferval.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/saferval.dat", true, new HexDecoder);
+       bool pass = true;
+       pass = BlockTransformationTest(VariableRoundsCipherFactory<SAFER_K_Encryption, SAFER_K_Decryption>(8,6), valdata, 4) && pass;
+       pass = BlockTransformationTest(VariableRoundsCipherFactory<SAFER_K_Encryption, SAFER_K_Decryption>(16,12), valdata, 4) && pass;
+@@ -876,7 +876,7 @@
+ {
+       cout << "\nRC2 validation suite running...\n\n";
+-      FileSource valdata("TestData/rc2val.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/rc2val.dat", true, new HexDecoder);
+       HexEncoder output(new FileSink(cout));
+       SecByteBlock plain(RC2Encryption::BLOCKSIZE), cipher(RC2Encryption::BLOCKSIZE), out(RC2Encryption::BLOCKSIZE), outplain(RC2Encryption::BLOCKSIZE);
+       SecByteBlock key(128);
+@@ -1086,7 +1086,7 @@
+ {
+       cout << "\nRC5 validation suite running...\n\n";
+-      FileSource valdata("TestData/rc5val.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/rc5val.dat", true, new HexDecoder);
+       return BlockTransformationTest(VariableRoundsCipherFactory<RC5Encryption, RC5Decryption>(16, 12), valdata);
+ }
+@@ -1094,7 +1094,7 @@
+ {
+       cout << "\nRC6 validation suite running...\n\n";
+-      FileSource valdata("TestData/rc6val.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/rc6val.dat", true, new HexDecoder);
+       bool pass = true;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<RC6Encryption, RC6Decryption>(16), valdata, 2) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<RC6Encryption, RC6Decryption>(24), valdata, 2) && pass;
+@@ -1106,7 +1106,7 @@
+ {
+       cout << "\nMARS validation suite running...\n\n";
+-      FileSource valdata("TestData/marsval.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/marsval.dat", true, new HexDecoder);
+       bool pass = true;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<MARSEncryption, MARSDecryption>(16), valdata, 4) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<MARSEncryption, MARSDecryption>(24), valdata, 3) && pass;
+@@ -1118,7 +1118,7 @@
+ {
+       cout << "\nRijndael (AES) validation suite running...\n\n";
+-      FileSource valdata("TestData/rijndael.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/rijndael.dat", true, new HexDecoder);
+       bool pass = true;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<RijndaelEncryption, RijndaelDecryption>(16), valdata, 4) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<RijndaelEncryption, RijndaelDecryption>(24), valdata, 3) && pass;
+@@ -1131,7 +1131,7 @@
+ {
+       cout << "\nTwofish validation suite running...\n\n";
+-      FileSource valdata("TestData/twofishv.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/twofishv.dat", true, new HexDecoder);
+       bool pass = true;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<TwofishEncryption, TwofishDecryption>(16), valdata, 4) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<TwofishEncryption, TwofishDecryption>(24), valdata, 3) && pass;
+@@ -1143,7 +1143,7 @@
+ {
+       cout << "\nSerpent validation suite running...\n\n";
+-      FileSource valdata("TestData/serpentv.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/serpentv.dat", true, new HexDecoder);
+       bool pass = true;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(16), valdata, 4) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(24), valdata, 3) && pass;
+@@ -1189,7 +1189,7 @@
+ {
+       cout << "\n3-WAY validation suite running...\n\n";
+-      FileSource valdata("TestData/3wayval.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/3wayval.dat", true, new HexDecoder);
+       return BlockTransformationTest(FixedRoundsCipherFactory<ThreeWayEncryption, ThreeWayDecryption>(), valdata);
+ }
+@@ -1197,7 +1197,7 @@
+ {
+       cout << "\nGOST validation suite running...\n\n";
+-      FileSource valdata("TestData/gostval.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/gostval.dat", true, new HexDecoder);
+       return BlockTransformationTest(FixedRoundsCipherFactory<GOSTEncryption, GOSTDecryption>(), valdata);
+ }
+@@ -1205,7 +1205,7 @@
+ {
+       cout << "\nSHARK validation suite running...\n\n";
+-      FileSource valdata("TestData/sharkval.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/sharkval.dat", true, new HexDecoder);
+       return BlockTransformationTest(FixedRoundsCipherFactory<SHARKEncryption, SHARKDecryption>(), valdata);
+ }
+@@ -1215,14 +1215,14 @@
+       cout << "\nCAST-128 validation suite running...\n\n";
+-      FileSource val128("TestData/cast128v.dat", true, new HexDecoder);
++      FileSource val128(PACKAGE_DATA_DIR "TestData/cast128v.dat", true, new HexDecoder);
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CAST128Encryption, CAST128Decryption>(16), val128, 1) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CAST128Encryption, CAST128Decryption>(10), val128, 1) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CAST128Encryption, CAST128Decryption>(5), val128, 1) && pass;
+       cout << "\nCAST-256 validation suite running...\n\n";
+-      FileSource val256("TestData/cast256v.dat", true, new HexDecoder);
++      FileSource val256(PACKAGE_DATA_DIR "TestData/cast256v.dat", true, new HexDecoder);
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CAST256Encryption, CAST256Decryption>(16), val256, 1) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CAST256Encryption, CAST256Decryption>(24), val256, 1) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CAST256Encryption, CAST256Decryption>(32), val256, 1) && pass;
+@@ -1234,7 +1234,7 @@
+ {
+       cout << "\nSquare validation suite running...\n\n";
+-      FileSource valdata("TestData/squareva.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/squareva.dat", true, new HexDecoder);
+       return BlockTransformationTest(FixedRoundsCipherFactory<SquareEncryption, SquareDecryption>(), valdata);
+ }
+@@ -1242,7 +1242,7 @@
+ {
+       cout << "\nSKIPJACK validation suite running...\n\n";
+-      FileSource valdata("TestData/skipjack.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/skipjack.dat", true, new HexDecoder);
+       return BlockTransformationTest(FixedRoundsCipherFactory<SKIPJACKEncryption, SKIPJACKDecryption>(), valdata);
+ }
+@@ -1346,7 +1346,7 @@
+       cout << "\nSHACAL-2 validation suite running...\n\n";
+       bool pass = true;
+-      FileSource valdata("TestData/shacal2v.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/shacal2v.dat", true, new HexDecoder);
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<SHACAL2Encryption, SHACAL2Decryption>(16), valdata, 4) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<SHACAL2Encryption, SHACAL2Decryption>(64), valdata, 10) && pass;
+       return pass;
+@@ -1357,7 +1357,7 @@
+       cout << "\nCamellia validation suite running...\n\n";
+       bool pass = true;
+-      FileSource valdata("TestData/camellia.dat", true, new HexDecoder);
++      FileSource valdata(PACKAGE_DATA_DIR "TestData/camellia.dat", true, new HexDecoder);
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CamelliaEncryption, CamelliaDecryption>(16), valdata, 15) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CamelliaEncryption, CamelliaDecryption>(24), valdata, 15) && pass;
+       pass = BlockTransformationTest(FixedRoundsCipherFactory<CamelliaEncryption, CamelliaDecryption>(32), valdata, 15) && pass;
+@@ -1368,19 +1368,19 @@
+ {
+       cout << "\nSalsa validation suite running...\n";
+-      return RunTestDataFile("TestVectors/salsa.txt");
++      return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/salsa.txt");
+ }
+ bool ValidateSosemanuk()
+ {
+       cout << "\nSosemanuk validation suite running...\n";
+-      return RunTestDataFile("TestVectors/sosemanuk.txt");
++      return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/sosemanuk.txt");
+ }
+ bool ValidateVMAC()
+ {
+       cout << "\nVMAC validation suite running...\n";
+-      return RunTestDataFile("TestVectors/vmac.txt");
++      return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/vmac.txt");
+ }
+ bool ValidateCCM()
+Index: libcrypto++/validat2.cpp
+===================================================================
+--- libcrypto++.orig/validat2.cpp      2009-04-07 03:08:36.000000000 +0200
++++ libcrypto++/validat2.cpp   2009-04-07 03:28:02.000000000 +0200
+@@ -268,7 +268,7 @@
+                       "\x69\x94\xac\x04\xf3\x41\xb5\x7d\x05\x20\x2d\x42\x8f\xb2\xa2\x7b"
+                       "\x5c\x77\xdf\xd9\xb1\x5b\xfc\x3d\x55\x93\x53\x50\x34\x10\xc1\xe1";
+-              FileSource keys("TestData/rsa512a.dat", true, new HexDecoder);
++              FileSource keys(PACKAGE_DATA_DIR "TestData/rsa512a.dat", true, new HexDecoder);
+               Weak::RSASSA_PKCS1v15_MD2_Signer rsaPriv(keys);
+               Weak::RSASSA_PKCS1v15_MD2_Verifier rsaPub(rsaPriv);
+@@ -293,7 +293,7 @@
+               cout << "invalid signature verification\n";
+       }
+       {
+-              FileSource keys("TestData/rsa1024.dat", true, new HexDecoder);
++              FileSource keys(PACKAGE_DATA_DIR "TestData/rsa1024.dat", true, new HexDecoder);
+               RSAES_PKCS1v15_Decryptor rsaPriv(keys);
+               RSAES_PKCS1v15_Encryptor rsaPub(rsaPriv);
+@@ -320,8 +320,8 @@
+               bq.Put(oaepSeed, 20);
+               FixedRNG rng(bq);
+-              FileSource privFile("TestData/rsa400pv.dat", true, new HexDecoder);
+-              FileSource pubFile("TestData/rsa400pb.dat", true, new HexDecoder);
++              FileSource privFile(PACKAGE_DATA_DIR "TestData/rsa400pv.dat", true, new HexDecoder);
++              FileSource pubFile(PACKAGE_DATA_DIR "TestData/rsa400pb.dat", true, new HexDecoder);
+               RSAES_OAEP_SHA_Decryptor rsaPriv;
+               rsaPriv.AccessKey().BERDecodePrivateKey(privFile, false, 0);
+               RSAES_OAEP_SHA_Encryptor rsaPub(pubFile);
+@@ -344,7 +344,7 @@
+ {
+       cout << "\nDH validation suite running...\n\n";
+-      FileSource f("TestData/dh1024.dat", true, new HexDecoder());
++      FileSource f(PACKAGE_DATA_DIR "TestData/dh1024.dat", true, new HexDecoder());
+       DH dh(f);
+       return SimpleKeyAgreementValidate(dh);
+ }
+@@ -353,7 +353,7 @@
+ {
+       cout << "\nMQV validation suite running...\n\n";
+-      FileSource f("TestData/mqv1024.dat", true, new HexDecoder());
++      FileSource f(PACKAGE_DATA_DIR "TestData/mqv1024.dat", true, new HexDecoder());
+       MQV mqv(f);
+       return AuthenticatedKeyAgreementValidate(mqv);
+ }
+@@ -362,7 +362,7 @@
+ {
+       cout << "\nLUC-DH validation suite running...\n\n";
+-      FileSource f("TestData/lucd512.dat", true, new HexDecoder());
++      FileSource f(PACKAGE_DATA_DIR "TestData/lucd512.dat", true, new HexDecoder());
+       LUC_DH dh(f);
+       return SimpleKeyAgreementValidate(dh);
+ }
+@@ -371,7 +371,7 @@
+ {
+       cout << "\nXTR-DH validation suite running...\n\n";
+-      FileSource f("TestData/xtrdh171.dat", true, new HexDecoder());
++      FileSource f(PACKAGE_DATA_DIR "TestData/xtrdh171.dat", true, new HexDecoder());
+       XTR_DH dh(f);
+       return SimpleKeyAgreementValidate(dh);
+ }
+@@ -381,7 +381,7 @@
+       cout << "\nElGamal validation suite running...\n\n";
+       bool pass = true;
+       {
+-              FileSource fc("TestData/elgc1024.dat", true, new HexDecoder);
++              FileSource fc(PACKAGE_DATA_DIR "TestData/elgc1024.dat", true, new HexDecoder);
+               ElGamalDecryptor privC(fc);
+               ElGamalEncryptor pubC(privC);
+               privC.AccessKey().Precompute();
+@@ -399,7 +399,7 @@
+       cout << "\nDLIES validation suite running...\n\n";
+       bool pass = true;
+       {
+-              FileSource fc("TestData/dlie1024.dat", true, new HexDecoder);
++              FileSource fc(PACKAGE_DATA_DIR "TestData/dlie1024.dat", true, new HexDecoder);
+               DLIES<>::Decryptor privC(fc);
+               DLIES<>::Encryptor pubC(privC);
+               pass = CryptoSystemValidate(privC, pubC) && pass;
+@@ -422,7 +422,7 @@
+       cout << "\nNR validation suite running...\n\n";
+       bool pass = true;
+       {
+-              FileSource f("TestData/nr2048.dat", true, new HexDecoder);
++              FileSource f(PACKAGE_DATA_DIR "TestData/nr2048.dat", true, new HexDecoder);
+               NR<SHA>::Signer privS(f);
+               privS.AccessKey().Precompute();
+               NR<SHA>::Verifier pubS(privS);
+@@ -445,7 +445,7 @@
+       bool pass = true, fail;
+       {
+-      FileSource fs("TestData/dsa512.dat", true, new HexDecoder());
++      FileSource fs(PACKAGE_DATA_DIR "TestData/dsa512.dat", true, new HexDecoder());
+       GDSA<SHA>::Signer priv(fs);
+       priv.AccessKey().Precompute(16);
+       GDSA<SHA>::Verifier pub(priv);
+@@ -487,10 +487,10 @@
+       fail = pub.VerifyMessage((byte *)"xyz", 3, sig, sizeof(sig));
+       pass = pass && !fail;
+       }
+-      FileSource fs1("TestData/dsa1024.dat", true, new HexDecoder());
++      FileSource fs1(PACKAGE_DATA_DIR "TestData/dsa1024.dat", true, new HexDecoder());
+       DSA::Signer priv(fs1);
+       DSA::Verifier pub(priv);
+-      FileSource fs2("TestData/dsa1024b.dat", true, new HexDecoder());
++      FileSource fs2(PACKAGE_DATA_DIR "TestData/dsa1024b.dat", true, new HexDecoder());
+       DSA::Verifier pub1(fs2);
+       assert(pub.GetKey() == pub1.GetKey());
+       pass = SignatureValidate(priv, pub, thorough) && pass;
+@@ -503,7 +503,7 @@
+       bool pass=true;
+       {
+-              FileSource f("TestData/luc1024.dat", true, new HexDecoder);
++              FileSource f(PACKAGE_DATA_DIR "TestData/luc1024.dat", true, new HexDecoder);
+               LUCSSA_PKCS1v15_SHA_Signer priv(f);
+               LUCSSA_PKCS1v15_SHA_Verifier pub(priv);
+               pass = SignatureValidate(priv, pub) && pass;
+@@ -520,14 +520,14 @@
+ {
+       cout << "\nLUC-HMP validation suite running...\n\n";
+-      FileSource f("TestData/lucs512.dat", true, new HexDecoder);
++      FileSource f(PACKAGE_DATA_DIR "TestData/lucs512.dat", true, new HexDecoder);
+       LUC_HMP<SHA>::Signer privS(f);
+       LUC_HMP<SHA>::Verifier pubS(privS);
+       bool pass = SignatureValidate(privS, pubS);
+       cout << "\nLUC-IES validation suite running...\n\n";
+-      FileSource fc("TestData/lucc512.dat", true, new HexDecoder);
++      FileSource fc(PACKAGE_DATA_DIR "TestData/lucc512.dat", true, new HexDecoder);
+       LUC_IES<>::Decryptor privC(fc);
+       LUC_IES<>::Encryptor pubC(privC);
+       pass = CryptoSystemValidate(privC, pubC) && pass;
+@@ -541,7 +541,7 @@
+       bool pass=true;
+       {
+-              FileSource f("TestData/rabi1024.dat", true, new HexDecoder);
++              FileSource f(PACKAGE_DATA_DIR "TestData/rabi1024.dat", true, new HexDecoder);
+               RabinSS<PSSR, SHA>::Signer priv(f);
+               RabinSS<PSSR, SHA>::Verifier pub(priv);
+               pass = SignatureValidate(priv, pub) && pass;
+@@ -558,7 +558,7 @@
+ {
+       cout << "\nRW validation suite running...\n\n";
+-      FileSource f("TestData/rw1024.dat", true, new HexDecoder);
++      FileSource f(PACKAGE_DATA_DIR "TestData/rw1024.dat", true, new HexDecoder);
+       RWSS<PSSR, SHA>::Signer priv(f);
+       RWSS<PSSR, SHA>::Verifier pub(priv);
+@@ -570,7 +570,7 @@
+ {
+       cout << "\nBlumGoldwasser validation suite running...\n\n";
+-      FileSource f("TestData/blum512.dat", true, new HexDecoder);
++      FileSource f(PACKAGE_DATA_DIR "TestData/blum512.dat", true, new HexDecoder);
+       BlumGoldwasserPrivateKey priv(f);
+       BlumGoldwasserPublicKey pub(priv);
+@@ -740,7 +740,7 @@
+               "\x74\x02\x37\x0E\xED\x0A\x06\xAD\xF4\x15\x65\xB8\xE1\xD1\x45\xAE\x39\x19\xB4\xFF\x5D\xF1\x45\x7B\xE0\xFE\x72\xED\x11\x92\x8F\x61\x41\x4F\x02\x00\xF2\x76\x6F\x7C"
+               "\x79\xA2\xE5\x52\x20\x5D\x97\x5E\xFE\x39\xAE\x21\x10\xFB\x35\xF4\x80\x81\x41\x13\xDD\xE8\x5F\xCA\x1E\x4F\xF8\x9B\xB2\x68\xFB\x28";
+-      FileSource keys("TestData/esig1536.dat", true, new HexDecoder);
++      FileSource keys(PACKAGE_DATA_DIR "TestData/esig1536.dat", true, new HexDecoder);
+       ESIGN<SHA>::Signer signer(keys);
+       ESIGN<SHA>::Verifier verifier(signer);
+Index: libcrypto++/validat3.cpp
+===================================================================
+--- libcrypto++.orig/validat3.cpp      2009-04-07 03:08:36.000000000 +0200
++++ libcrypto++/validat3.cpp   2009-04-07 03:29:42.000000000 +0200
+@@ -365,14 +365,14 @@
+ {
+       cout << "\nPanama validation suite running...\n";
+-      return RunTestDataFile("TestVectors/panama.txt");
++      return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/panama.txt");
+ }
+ bool ValidateWhirlpool()
+ {
+       cout << "\nWhirlpool Hash Function validation suite running...\n";
+-      return RunTestDataFile("TestVectors/whrlpool.txt");
++      return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/whrlpool.txt");
+ }
+ #ifdef CRYPTOPP_REMOVED
diff --git a/libs/libcrypto++/patches/003-autoconf_files.patch b/libs/libcrypto++/patches/003-autoconf_files.patch
new file mode 100644 (file)
index 0000000..16ea3ff
--- /dev/null
@@ -0,0 +1,822 @@
+--- /dev/null  2009-09-20 12:09:29.503935207 +0200
++++ debian/configure.ac        2009-09-20 18:51:50.000000000 +0200
+@@ -0,0 +1,43 @@
++# -*- autoconf -*-
++# Process this file with autoconf to produce a configure script.
++# Written by Jens Peter Secher <jps@debian.org>.
++
++AC_INIT([Crypto++], [5.6.0], [libcrypto++@bugs.debian.org])
++AC_CONFIG_SRCDIR([cryptlib.h])
++AC_CONFIG_HEADERS([cryptopp_config.h])
++AC_CONFIG_HEADERS([config.h])
++AM_INIT_AUTOMAKE([foreign])
++AM_MAINTAINER_MODE
++
++# Checks for programs.
++AC_PROG_CXX
++AC_PROG_CC
++AC_PROG_LN_S
++AC_PROG_LIBTOOL
++
++# Checks for header files.
++AC_HEADER_STDC
++AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
++
++# Checks for typedefs, structures, and compiler characteristics.
++AC_HEADER_STDBOOL
++AC_C_CONST
++AC_C_INLINE
++AC_TYPE_SIZE_T
++AC_HEADER_TIME
++AC_CHECK_TYPES([ptrdiff_t])
++AC_C_BIGENDIAN(
++      AC_DEFINE(IS_BIG_ENDIAN, [], [Big-endian architecture]),
++      AC_DEFINE(IS_LITTLE_ENDIAN, [], [Little-endian architecture]),
++      AC_MSG_ERROR([Can't tell endianess of platform]))
++
++# Checks for library functions.
++AC_PROG_GCC_TRADITIONAL
++AC_FUNC_MALLOC
++AC_FUNC_MEMCMP
++AC_FUNC_SELECT_ARGTYPES
++AC_TYPE_SIGNAL
++AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset pow select socket])
++
++AC_CONFIG_FILES([Makefile libcrypto++.pc])
++AC_OUTPUT
+--- /dev/null  2009-09-20 12:09:29.503935207 +0200
++++ debian/Makefile.am 2009-09-20 18:51:50.000000000 +0200
+@@ -0,0 +1,303 @@
++## Process this file with automake to produce Makefile.in
++# Written by Jens Peter Secher <jps@debian.org>.
++
++# Build two versions of cryptest, one that uses data files from the
++# current working directory, and one that uses data files from
++# /usr/share/crypto++.  The former is for running the test suite at
++# build time, the latter is included in the package.
++
++# To test against newest GCC, uncomment the following two lines.
++#CXX = /usr/lib/gcc-snapshot/bin/g++
++#CXXCPP = /usr/lib/gcc-snapshot/bin/g++
++
++bin_PROGRAMS = cryptest cryptestcwd
++cryptest_CXXFLAGS = -DPACKAGE_DATA_DIR='"/usr/share/crypto++/"'
++cryptest_SOURCES = \
++      bench.cpp \
++      bench2.cpp \
++      datatest.cpp \
++      dlltest.cpp \
++      fipsalgt.cpp \
++      regtest.cpp \
++      test.cpp \
++      validat1.cpp \
++      validat2.cpp \
++      validat3.cpp
++cryptest_LDADD = libcrypto++.la
++cryptestcwd_CXXFLAGS = -DPACKAGE_DATA_DIR='""'
++cryptestcwd_SOURCES = \
++      bench.cpp \
++      bench2.cpp \
++      datatest.cpp \
++      dlltest.cpp \
++      fipsalgt.cpp \
++      regtest.cpp \
++      test.cpp \
++      validat1.cpp \
++      validat2.cpp \
++      validat3.cpp
++cryptestcwd_LDADD = libcrypto++.la
++
++lib_LTLIBRARIES = libcrypto++.la
++libcrypto___la_LDFLAGS = -version-info 8:0:0
++libcrypto___la_SOURCES = \
++      3way.cpp \
++      adler32.cpp \
++      algebra.cpp \
++      algparam.cpp \
++      arc4.cpp \
++      asn.cpp \
++      authenc.cpp \
++      base32.cpp \
++      base64.cpp \
++      basecode.cpp \
++      bfinit.cpp \
++      blowfish.cpp \
++      blumshub.cpp \
++      camellia.cpp \
++      cast.cpp \
++      casts.cpp \
++      cbcmac.cpp \
++      ccm.cpp \
++      channels.cpp \
++      cmac.cpp \
++      cpu.cpp \
++      crc.cpp \
++      cryptlib.cpp \
++      default.cpp \
++      des.cpp \
++      dessp.cpp \
++      dh2.cpp \
++      dh.cpp \
++      dll.cpp \
++      dsa.cpp \
++      eax.cpp \
++      ec2n.cpp \
++      eccrypto.cpp \
++      ecp.cpp \
++      elgamal.cpp \
++      emsa2.cpp \
++      eprecomp.cpp \
++      esign.cpp \
++      files.cpp \
++      filters.cpp \
++      fips140.cpp \
++      fipstest.cpp \
++      gcm.cpp \
++      gf2_32.cpp \
++      gf256.cpp \
++      gf2n.cpp \
++      gfpcrypt.cpp \
++      gost.cpp \
++      gzip.cpp \
++      hex.cpp \
++      hmac.cpp \
++      hrtimer.cpp \
++      ida.cpp \
++      idea.cpp \
++      integer.cpp \
++      iterhash.cpp \
++      luc.cpp \
++      mars.cpp \
++      marss.cpp \
++      md2.cpp \
++      md4.cpp \
++      md5.cpp \
++      misc.cpp \
++      modes.cpp \
++      mqueue.cpp \
++      mqv.cpp \
++      nbtheory.cpp \
++      network.cpp \
++      oaep.cpp \
++      osrng.cpp \
++      panama.cpp \
++      pch.cpp \
++      pkcspad.cpp \
++      polynomi.cpp \
++      pssr.cpp \
++      pubkey.cpp \
++      queue.cpp \
++      rabin.cpp \
++      randpool.cpp \
++      rc2.cpp \
++      rc5.cpp \
++      rc6.cpp \
++      rdtables.cpp \
++      rijndael.cpp \
++      ripemd.cpp \
++      rng.cpp \
++      rsa.cpp \
++      rw.cpp \
++      safer.cpp \
++      salsa.cpp \
++      seal.cpp \
++      seed.cpp \
++      serpent.cpp \
++      shacal2.cpp \
++      sha.cpp \
++      sharkbox.cpp \
++      shark.cpp \
++      simple.cpp \
++      skipjack.cpp \
++      socketft.cpp \
++      sosemanuk.cpp \
++      square.cpp \
++      squaretb.cpp \
++      strciphr.cpp \
++      tea.cpp \
++      tftables.cpp \
++      tiger.cpp \
++      tigertab.cpp \
++      trdlocal.cpp \
++      ttmac.cpp \
++      twofish.cpp \
++      vmac.cpp \
++      wait.cpp \
++      wake.cpp \
++      whrlpool.cpp \
++      winpipes.cpp \
++      xtr.cpp \
++      xtrcrypt.cpp \
++      zdeflate.cpp \
++      zinflate.cpp \
++      zlib.cpp
++
++pkginclude_HEADERS = \
++      3way.h \
++      adler32.h \
++      aes.h \
++      algebra.h \
++      algparam.h \
++      arc4.h \
++      argnames.h \
++      asn.h \
++      authenc.h \
++      base32.h \
++      base64.h \
++      basecode.h \
++      bench.h \
++      blowfish.h \
++      blumshub.h \
++      camellia.h \
++      cast.h \
++      cbcmac.h \
++      ccm.h \
++      channels.h \
++      cmac.h \
++      config.h \
++      cpu.h \
++      crc.h \
++      cryptlib.h \
++      default.h \
++      des.h \
++      dh2.h \
++      dh.h \
++      dll.h \
++      dmac.h \
++      dsa.h \
++      eax.h \
++      ec2n.h \
++      eccrypto.h \
++      ecp.h \
++      elgamal.h \
++      emsa2.h \
++      eprecomp.h \
++      esign.h \
++      factory.h \
++      files.h \
++      filters.h \
++      fips140.h \
++      fltrimpl.h \
++      gcm.h \
++      gf2_32.h \
++      gf256.h \
++      gf2n.h \
++      gfpcrypt.h \
++      gost.h \
++      gzip.h \
++      hex.h \
++      hmac.h \
++      hrtimer.h \
++      ida.h \
++      idea.h \
++      integer.h \
++      iterhash.h \
++      lubyrack.h \
++      luc.h \
++      mars.h \
++      md2.h \
++      md4.h \
++      md5.h \
++      mdc.h \
++      misc.h \
++      modarith.h \
++      modes.h  \
++      modexppc.h \
++      mqueue.h \
++      mqv.h \
++      nbtheory.h \
++      network.h \
++      nr.h \
++      oaep.h \
++      oids.h \
++      osrng.h \
++      panama.h \
++      pch.h \
++      pkcspad.h \
++      polynomi.h \
++      pssr.h \
++      pubkey.h \
++      pwdbased.h \
++      queue.h \
++      rabin.h \
++      randpool.h \
++      rc2.h \
++      rc5.h \
++      rc6.h \
++      rijndael.h \
++      ripemd.h \
++      rng.h \
++      rsa.h \
++      rw.h \
++      safer.h \
++      salsa.h \
++      seal.h \
++      secblock.h \
++      seckey.h \
++      seed.h \
++      serpent.h \
++      serpentp.h \
++      shacal2.h \
++      sha.h \
++      shark.h \
++      simple.h \
++      skipjack.h \
++      smartptr.h \
++      socketft.h \
++      sosemanuk.h \
++      square.h \
++      stdcpp.h \
++      strciphr.h \
++      tea.h \
++      tiger.h \
++      trdlocal.h \
++      trunhash.h \
++      ttmac.h \
++      twofish.h \
++      vmac.h \
++      wait.h \
++      wake.h \
++      whrlpool.h \
++      winpipes.h \
++      words.h \
++      xtr.h \
++      xtrcrypt.h \
++      zdeflate.h \
++      zinflate.h \
++      zlib.h
++
++htmldir = $(datadir)/html
++
++html: $(libcrypto___la_SOURCES)
++      doxygen
+--- /dev/null  2009-09-20 12:09:29.503935207 +0200
++++ debian/config.h.in 2009-09-20 18:51:50.000000000 +0200
+@@ -0,0 +1,452 @@
++// Debian note: This is a copy of the original config.h file except for the two
++// endianness undefs below; they are substituted by the autoconf process
++// according to the build architecture.
++
++#ifndef CRYPTOPP_CONFIG_H
++#define CRYPTOPP_CONFIG_H
++
++// ***************** Important Settings ********************
++
++// Endianness
++#undef IS_BIG_ENDIAN
++#undef IS_LITTLE_ENDIAN
++
++// define this if you want to disable all OS-dependent features,
++// such as sockets and OS-provided random number generators
++// #define NO_OS_DEPENDENCE
++
++// Define this to use features provided by Microsoft's CryptoAPI.
++// Currently the only feature used is random number generation.
++// This macro will be ignored if NO_OS_DEPENDENCE is defined.
++#define USE_MS_CRYPTOAPI
++
++// Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used
++#ifndef DSA_1024_BIT_MODULUS_ONLY
++#     define DSA_1024_BIT_MODULUS_ONLY 1
++#endif
++
++// ***************** Less Important Settings ***************
++
++// define this to retain (as much as possible) old deprecated function and class names
++// #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
++
++#define GZIP_OS_CODE 0
++
++// Try this if your CPU has 256K internal cache or a slow multiply instruction
++// and you want a (possibly) faster IDEA implementation using log tables
++// #define IDEA_LARGECACHE
++
++// Define this if, for the linear congruential RNG, you want to use
++// the original constants as specified in S.K. Park and K.W. Miller's
++// CACM paper.
++// #define LCRNG_ORIGINAL_NUMBERS
++
++// choose which style of sockets to wrap (mostly useful for cygwin which has both)
++#define PREFER_BERKELEY_STYLE_SOCKETS
++// #define PREFER_WINDOWS_STYLE_SOCKETS
++
++// set the name of Rijndael cipher, was "Rijndael" before version 5.3
++#define CRYPTOPP_RIJNDAEL_NAME "AES"
++
++// ***************** Important Settings Again ********************
++// But the defaults should be ok.
++
++// namespace support is now required
++#ifdef NO_NAMESPACE
++#     error namespace support is now required
++#endif
++
++// Define this to workaround a Microsoft CryptoAPI bug where
++// each call to CryptAcquireContext causes a 100 KB memory leak.
++// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.
++#define WORKAROUND_MS_BUG_Q258000
++
++#ifdef CRYPTOPP_DOXYGEN_PROCESSING
++// Avoid putting "CryptoPP::" in front of everything in Doxygen output
++#     define CryptoPP
++#     define NAMESPACE_BEGIN(x)
++#     define NAMESPACE_END
++// Get Doxygen to generate better documentation for these typedefs
++#     define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
++#else
++#     define NAMESPACE_BEGIN(x) namespace x {
++#     define NAMESPACE_END }
++#     define DOCUMENTED_TYPEDEF(x, y) typedef x y;
++#endif
++#define ANONYMOUS_NAMESPACE_BEGIN namespace {
++#define USING_NAMESPACE(x) using namespace x;
++#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
++#define DOCUMENTED_NAMESPACE_END }
++
++// What is the type of the third parameter to bind?
++// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.
++// Unfortunately there is no way to tell whether or not socklen_t is defined.
++// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.
++#ifndef TYPE_OF_SOCKLEN_T
++#     if defined(_WIN32) || defined(__CYGWIN__)
++#             define TYPE_OF_SOCKLEN_T int
++#     else
++#             define TYPE_OF_SOCKLEN_T ::socklen_t
++#     endif
++#endif
++
++#if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
++#     define __USE_W32_SOCKETS
++#endif
++
++typedef unsigned char byte;           // put in global namespace to avoid ambiguity with other byte typedefs
++
++NAMESPACE_BEGIN(CryptoPP)
++
++typedef unsigned short word16;
++typedef unsigned int word32;
++
++#if defined(_MSC_VER) || defined(__BORLANDC__)
++      typedef unsigned __int64 word64;
++      #define W64LIT(x) x##ui64
++#else
++      typedef unsigned long long word64;
++      #define W64LIT(x) x##ULL
++#endif
++
++// define large word type, used for file offsets and such
++typedef word64 lword;
++const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
++
++#ifdef __GNUC__
++      #define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
++#endif
++
++// define hword, word, and dword. these are used for multiprecision integer arithmetic
++// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
++#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__))
++      typedef word32 hword;
++      typedef word64 word;
++#else
++      #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
++      #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__)
++              #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400
++                      // GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3
++                      // mode(TI) division broken on amd64 with GCC earlier than GCC 3.4
++                      typedef word32 hword;
++                      typedef word64 word;
++                      typedef __uint128_t dword;
++                      typedef __uint128_t word128;
++                      #define CRYPTOPP_WORD128_AVAILABLE
++              #else
++                      // if we're here, it means we're on a 64-bit CPU but we don't have a way to obtain 128-bit multiplication results
++                      typedef word16 hword;
++                      typedef word32 word;
++                      typedef word64 dword;
++              #endif
++      #else
++              // being here means the native register size is probably 32 bits or less
++              #define CRYPTOPP_BOOL_SLOW_WORD64 1
++              typedef word16 hword;
++              typedef word32 word;
++              typedef word64 dword;
++      #endif
++#endif
++#ifndef CRYPTOPP_BOOL_SLOW_WORD64
++      #define CRYPTOPP_BOOL_SLOW_WORD64 0
++#endif
++
++const unsigned int WORD_SIZE = sizeof(word);
++const unsigned int WORD_BITS = WORD_SIZE * 8;
++
++NAMESPACE_END
++
++#ifndef CRYPTOPP_L1_CACHE_LINE_SIZE
++      // This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks.
++      #if defined(_M_X64) || defined(__x86_64__)
++              #define CRYPTOPP_L1_CACHE_LINE_SIZE 64
++      #else
++              // L1 cache line size is 32 on Pentium III and earlier
++              #define CRYPTOPP_L1_CACHE_LINE_SIZE 32
++      #endif
++#endif
++
++#if defined(_MSC_VER)
++      #if _MSC_VER == 1200
++              #include <malloc.h>
++      #endif
++      #if _MSC_VER > 1200 || defined(_mm_free)
++              #define CRYPTOPP_MSVC6PP_OR_LATER               // VC 6 processor pack or later
++      #else
++              #define CRYPTOPP_MSVC6_NO_PP                    // VC 6 without processor pack
++      #endif
++#endif
++
++#ifndef CRYPTOPP_ALIGN_DATA
++      #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
++              #define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
++      #elif defined(__GNUC__)
++              #define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
++      #else
++              #define CRYPTOPP_ALIGN_DATA(x)
++      #endif
++#endif
++
++#ifndef CRYPTOPP_SECTION_ALIGN16
++      #if defined(__GNUC__) && !defined(__APPLE__)
++              // the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on
++              #define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16")))
++      #else
++              #define CRYPTOPP_SECTION_ALIGN16
++      #endif
++#endif
++
++#if defined(_MSC_VER) || defined(__fastcall)
++      #define CRYPTOPP_FASTCALL __fastcall
++#else
++      #define CRYPTOPP_FASTCALL
++#endif
++
++// VC60 workaround: it doesn't allow typename in some places
++#if defined(_MSC_VER) && (_MSC_VER < 1300)
++#define CPP_TYPENAME
++#else
++#define CPP_TYPENAME typename
++#endif
++
++// VC60 workaround: can't cast unsigned __int64 to float or double
++#if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER)
++#define CRYPTOPP_VC6_INT64 (__int64)
++#else
++#define CRYPTOPP_VC6_INT64
++#endif
++
++#ifdef _MSC_VER
++#define CRYPTOPP_NO_VTABLE __declspec(novtable)
++#else
++#define CRYPTOPP_NO_VTABLE
++#endif
++
++#ifdef _MSC_VER
++      // 4231: nonstandard extension used : 'extern' before template explicit instantiation
++      // 4250: dominance
++      // 4251: member needs to have dll-interface
++      // 4275: base needs to have dll-interface
++      // 4660: explicitly instantiating a class that's already implicitly instantiated
++      // 4661: no suitable definition provided for explicit template instantiation request
++      // 4786: identifer was truncated in debug information
++      // 4355: 'this' : used in base member initializer list
++      // 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
++#     pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355 4910)
++#endif
++
++#ifdef __BORLANDC__
++// 8037: non-const function called for const object. needed to work around BCB2006 bug
++#     pragma warn -8037
++#endif
++
++#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
++#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
++#endif
++
++#ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
++#define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
++#endif
++
++#ifdef CRYPTOPP_DISABLE_X86ASM                // for backwards compatibility: this macro had both meanings
++#define CRYPTOPP_DISABLE_ASM
++#define CRYPTOPP_DISABLE_SSE2
++#endif
++
++#if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))))
++      #define CRYPTOPP_X86_ASM_AVAILABLE
++
++      #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300)
++              #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
++      #else
++              #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
++      #endif
++
++      // SSSE3 was actually introduced in GNU as 2.17, which was released 6/23/2006, but we can't tell what version of binutils is installed.
++      // GCC 4.1.2 was released on 2/13/2007, so we'll use that as a proxy for the binutils version.
++      #if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102)
++              #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
++      #else
++              #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
++      #endif
++#endif
++
++#if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64)
++      #define CRYPTOPP_X64_MASM_AVAILABLE
++#endif
++
++#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__)
++      #define CRYPTOPP_X64_ASM_AVAILABLE
++#endif
++
++#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__))
++      #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1
++#else
++      #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
++#endif
++
++#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
++      #define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
++#else
++      #define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
++#endif
++
++// how to allocate 16-byte aligned memory (for SSE2)
++#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
++      #define CRYPTOPP_MM_MALLOC_AVAILABLE
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++      #define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
++#elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
++      #define CRYPTOPP_MEMALIGN_AVAILABLE
++#else
++      #define CRYPTOPP_NO_ALIGNED_ALLOC
++#endif
++
++// how to disable inlining
++#if defined(_MSC_VER) && _MSC_VER >= 1300
++#     define CRYPTOPP_NOINLINE_DOTDOTDOT
++#     define CRYPTOPP_NOINLINE __declspec(noinline)
++#elif defined(__GNUC__)
++#     define CRYPTOPP_NOINLINE_DOTDOTDOT
++#     define CRYPTOPP_NOINLINE __attribute__((noinline))
++#else
++#     define CRYPTOPP_NOINLINE_DOTDOTDOT ...
++#     define CRYPTOPP_NOINLINE 
++#endif
++
++// how to declare class constants
++#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER)
++#     define CRYPTOPP_CONSTANT(x) enum {x};
++#else
++#     define CRYPTOPP_CONSTANT(x) static const int x;
++#endif
++
++#if defined(_M_X64) || defined(__x86_64__)
++      #define CRYPTOPP_BOOL_X64 1
++#else
++      #define CRYPTOPP_BOOL_X64 0
++#endif
++
++// see http://predef.sourceforge.net/prearch.html
++#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)
++      #define CRYPTOPP_BOOL_X86 1
++#else
++      #define CRYPTOPP_BOOL_X86 0
++#endif
++
++#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || defined(__powerpc__)
++      #define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
++#endif
++
++#define CRYPTOPP_VERSION 560
++
++// ***************** determine availability of OS features ********************
++
++#ifndef NO_OS_DEPENDENCE
++
++#if defined(_WIN32) || defined(__CYGWIN__)
++#define CRYPTOPP_WIN32_AVAILABLE
++#endif
++
++#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
++#define CRYPTOPP_UNIX_AVAILABLE
++#endif
++
++#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
++#     define HIGHRES_TIMER_AVAILABLE
++#endif
++
++#ifdef CRYPTOPP_UNIX_AVAILABLE
++#     define HAS_BERKELEY_STYLE_SOCKETS
++#endif
++
++#ifdef CRYPTOPP_WIN32_AVAILABLE
++#     define HAS_WINDOWS_STYLE_SOCKETS
++#endif
++
++#if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS))
++#     define SOCKETS_AVAILABLE
++#endif
++
++#if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
++#     define USE_WINDOWS_STYLE_SOCKETS
++#else
++#     define USE_BERKELEY_STYLE_SOCKETS
++#endif
++
++#if defined(HIGHRES_TIMER_AVAILABLE) && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
++#     define WINDOWS_PIPES_AVAILABLE
++#endif
++
++#if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI)
++#     define NONBLOCKING_RNG_AVAILABLE
++#     define OS_RNG_AVAILABLE
++#endif
++
++#if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
++#     define NONBLOCKING_RNG_AVAILABLE
++#     define BLOCKING_RNG_AVAILABLE
++#     define OS_RNG_AVAILABLE
++#     define HAS_PTHREADS
++#     define THREADS_AVAILABLE
++#endif
++
++#ifdef CRYPTOPP_WIN32_AVAILABLE
++#     define HAS_WINTHREADS
++#     define THREADS_AVAILABLE
++#endif
++
++#endif        // NO_OS_DEPENDENCE
++
++// ***************** DLL related ********************
++
++#ifdef CRYPTOPP_WIN32_AVAILABLE
++
++#ifdef CRYPTOPP_EXPORTS
++#define CRYPTOPP_IS_DLL
++#define CRYPTOPP_DLL __declspec(dllexport)
++#elif defined(CRYPTOPP_IMPORTS)
++#define CRYPTOPP_IS_DLL
++#define CRYPTOPP_DLL __declspec(dllimport)
++#else
++#define CRYPTOPP_DLL
++#endif
++
++#define CRYPTOPP_API __cdecl
++
++#else // CRYPTOPP_WIN32_AVAILABLE
++
++#define CRYPTOPP_DLL
++#define CRYPTOPP_API
++
++#endif        // CRYPTOPP_WIN32_AVAILABLE
++
++#if defined(__MWERKS__)
++#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
++#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
++#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
++#else
++#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
++#endif
++
++#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
++#define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
++#else
++#define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
++#endif
++
++#if defined(__MWERKS__)
++#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
++#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
++#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
++#else
++#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
++#endif
++
++#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
++#define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
++#else
++#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
++#endif
++
++#endif
+--- /dev/null  2009-09-20 12:09:29.503935207 +0200
++++ debian/libcrypto++.pc.in   2009-09-20 18:51:50.000000000 +0200
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: libcrypto++
++Description: General purpose cryptographic shared library
++URL: http://www.cryptopp.com
++Version: @VERSION@
++Requires:
++Libs: -lcrypto++
++Cflags: