1 --- /dev/null 2009-09-20 12:09:29.503935207 +0200
2 +++ debian/configure.ac 2009-09-20 18:51:50.000000000 +0200
5 +# Process this file with autoconf to produce a configure script.
6 +# Written by Jens Peter Secher <jps@debian.org>.
8 +AC_INIT([Crypto++], [5.6.0], [libcrypto++@bugs.debian.org])
9 +AC_CONFIG_SRCDIR([cryptlib.h])
10 +AC_CONFIG_HEADERS([cryptopp_config.h])
11 +AC_CONFIG_HEADERS([config.h])
12 +AM_INIT_AUTOMAKE([foreign])
15 +# Checks for programs.
21 +# Checks for header files.
23 +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])
25 +# Checks for typedefs, structures, and compiler characteristics.
31 +AC_CHECK_TYPES([ptrdiff_t])
33 + AC_DEFINE(IS_BIG_ENDIAN, [], [Big-endian architecture]),
34 + AC_DEFINE(IS_LITTLE_ENDIAN, [], [Little-endian architecture]),
35 + AC_MSG_ERROR([Can't tell endianess of platform]))
37 +# Checks for library functions.
38 +AC_PROG_GCC_TRADITIONAL
41 +AC_FUNC_SELECT_ARGTYPES
43 +AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset pow select socket])
45 +AC_CONFIG_FILES([Makefile libcrypto++.pc])
47 --- /dev/null 2009-09-20 12:09:29.503935207 +0200
48 +++ debian/Makefile.am 2009-09-20 18:51:50.000000000 +0200
50 +## Process this file with automake to produce Makefile.in
51 +# Written by Jens Peter Secher <jps@debian.org>.
53 +# Build two versions of cryptest, one that uses data files from the
54 +# current working directory, and one that uses data files from
55 +# /usr/share/crypto++. The former is for running the test suite at
56 +# build time, the latter is included in the package.
58 +# To test against newest GCC, uncomment the following two lines.
59 +#CXX = /usr/lib/gcc-snapshot/bin/g++
60 +#CXXCPP = /usr/lib/gcc-snapshot/bin/g++
62 +bin_PROGRAMS = cryptest cryptestcwd
63 +cryptest_CXXFLAGS = -DPACKAGE_DATA_DIR='"/usr/share/crypto++/"'
75 +cryptest_LDADD = libcrypto++.la
76 +cryptestcwd_CXXFLAGS = -DPACKAGE_DATA_DIR='""'
77 +cryptestcwd_SOURCES = \
88 +cryptestcwd_LDADD = libcrypto++.la
90 +lib_LTLIBRARIES = libcrypto++.la
91 +libcrypto___la_LDFLAGS = -version-info 8:0:0
92 +libcrypto___la_SOURCES = \
215 +pkginclude_HEADERS = \
349 +htmldir = $(datadir)/html
351 +html: $(libcrypto___la_SOURCES)
353 --- /dev/null 2009-09-20 12:09:29.503935207 +0200
354 +++ debian/config.h.in 2009-09-20 18:51:50.000000000 +0200
356 +// Debian note: This is a copy of the original config.h file except for the two
357 +// endianness undefs below; they are substituted by the autoconf process
358 +// according to the build architecture.
360 +#ifndef CRYPTOPP_CONFIG_H
361 +#define CRYPTOPP_CONFIG_H
363 +// ***************** Important Settings ********************
366 +#undef IS_BIG_ENDIAN
367 +#undef IS_LITTLE_ENDIAN
369 +// define this if you want to disable all OS-dependent features,
370 +// such as sockets and OS-provided random number generators
371 +// #define NO_OS_DEPENDENCE
373 +// Define this to use features provided by Microsoft's CryptoAPI.
374 +// Currently the only feature used is random number generation.
375 +// This macro will be ignored if NO_OS_DEPENDENCE is defined.
376 +#define USE_MS_CRYPTOAPI
378 +// Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used
379 +#ifndef DSA_1024_BIT_MODULUS_ONLY
380 +# define DSA_1024_BIT_MODULUS_ONLY 1
383 +// ***************** Less Important Settings ***************
385 +// define this to retain (as much as possible) old deprecated function and class names
386 +// #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
388 +#define GZIP_OS_CODE 0
390 +// Try this if your CPU has 256K internal cache or a slow multiply instruction
391 +// and you want a (possibly) faster IDEA implementation using log tables
392 +// #define IDEA_LARGECACHE
394 +// Define this if, for the linear congruential RNG, you want to use
395 +// the original constants as specified in S.K. Park and K.W. Miller's
397 +// #define LCRNG_ORIGINAL_NUMBERS
399 +// choose which style of sockets to wrap (mostly useful for cygwin which has both)
400 +#define PREFER_BERKELEY_STYLE_SOCKETS
401 +// #define PREFER_WINDOWS_STYLE_SOCKETS
403 +// set the name of Rijndael cipher, was "Rijndael" before version 5.3
404 +#define CRYPTOPP_RIJNDAEL_NAME "AES"
406 +// ***************** Important Settings Again ********************
407 +// But the defaults should be ok.
409 +// namespace support is now required
411 +# error namespace support is now required
414 +// Define this to workaround a Microsoft CryptoAPI bug where
415 +// each call to CryptAcquireContext causes a 100 KB memory leak.
416 +// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.
417 +#define WORKAROUND_MS_BUG_Q258000
419 +#ifdef CRYPTOPP_DOXYGEN_PROCESSING
420 +// Avoid putting "CryptoPP::" in front of everything in Doxygen output
422 +# define NAMESPACE_BEGIN(x)
423 +# define NAMESPACE_END
424 +// Get Doxygen to generate better documentation for these typedefs
425 +# define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
427 +# define NAMESPACE_BEGIN(x) namespace x {
428 +# define NAMESPACE_END }
429 +# define DOCUMENTED_TYPEDEF(x, y) typedef x y;
431 +#define ANONYMOUS_NAMESPACE_BEGIN namespace {
432 +#define USING_NAMESPACE(x) using namespace x;
433 +#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
434 +#define DOCUMENTED_NAMESPACE_END }
436 +// What is the type of the third parameter to bind?
437 +// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.
438 +// Unfortunately there is no way to tell whether or not socklen_t is defined.
439 +// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.
440 +#ifndef TYPE_OF_SOCKLEN_T
441 +# if defined(_WIN32) || defined(__CYGWIN__)
442 +# define TYPE_OF_SOCKLEN_T int
444 +# define TYPE_OF_SOCKLEN_T ::socklen_t
448 +#if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
449 +# define __USE_W32_SOCKETS
452 +typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs
454 +NAMESPACE_BEGIN(CryptoPP)
456 +typedef unsigned short word16;
457 +typedef unsigned int word32;
459 +#if defined(_MSC_VER) || defined(__BORLANDC__)
460 + typedef unsigned __int64 word64;
461 + #define W64LIT(x) x##ui64
463 + typedef unsigned long long word64;
464 + #define W64LIT(x) x##ULL
467 +// define large word type, used for file offsets and such
468 +typedef word64 lword;
469 +const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
472 + #define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
475 +// define hword, word, and dword. these are used for multiprecision integer arithmetic
476 +// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
477 +#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__))
478 + typedef word32 hword;
479 + typedef word64 word;
481 + #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
482 + #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__)
483 + #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400
484 + // GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3
485 + // mode(TI) division broken on amd64 with GCC earlier than GCC 3.4
486 + typedef word32 hword;
487 + typedef word64 word;
488 + typedef __uint128_t dword;
489 + typedef __uint128_t word128;
490 + #define CRYPTOPP_WORD128_AVAILABLE
492 + // 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
493 + typedef word16 hword;
494 + typedef word32 word;
495 + typedef word64 dword;
498 + // being here means the native register size is probably 32 bits or less
499 + #define CRYPTOPP_BOOL_SLOW_WORD64 1
500 + typedef word16 hword;
501 + typedef word32 word;
502 + typedef word64 dword;
505 +#ifndef CRYPTOPP_BOOL_SLOW_WORD64
506 + #define CRYPTOPP_BOOL_SLOW_WORD64 0
509 +const unsigned int WORD_SIZE = sizeof(word);
510 +const unsigned int WORD_BITS = WORD_SIZE * 8;
514 +#ifndef CRYPTOPP_L1_CACHE_LINE_SIZE
515 + // This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks.
516 + #if defined(_M_X64) || defined(__x86_64__)
517 + #define CRYPTOPP_L1_CACHE_LINE_SIZE 64
519 + // L1 cache line size is 32 on Pentium III and earlier
520 + #define CRYPTOPP_L1_CACHE_LINE_SIZE 32
524 +#if defined(_MSC_VER)
525 + #if _MSC_VER == 1200
526 + #include <malloc.h>
528 + #if _MSC_VER > 1200 || defined(_mm_free)
529 + #define CRYPTOPP_MSVC6PP_OR_LATER // VC 6 processor pack or later
531 + #define CRYPTOPP_MSVC6_NO_PP // VC 6 without processor pack
535 +#ifndef CRYPTOPP_ALIGN_DATA
536 + #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
537 + #define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
538 + #elif defined(__GNUC__)
539 + #define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
541 + #define CRYPTOPP_ALIGN_DATA(x)
545 +#ifndef CRYPTOPP_SECTION_ALIGN16
546 + #if defined(__GNUC__) && !defined(__APPLE__)
547 + // the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on
548 + #define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16")))
550 + #define CRYPTOPP_SECTION_ALIGN16
554 +#if defined(_MSC_VER) || defined(__fastcall)
555 + #define CRYPTOPP_FASTCALL __fastcall
557 + #define CRYPTOPP_FASTCALL
560 +// VC60 workaround: it doesn't allow typename in some places
561 +#if defined(_MSC_VER) && (_MSC_VER < 1300)
562 +#define CPP_TYPENAME
564 +#define CPP_TYPENAME typename
567 +// VC60 workaround: can't cast unsigned __int64 to float or double
568 +#if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER)
569 +#define CRYPTOPP_VC6_INT64 (__int64)
571 +#define CRYPTOPP_VC6_INT64
575 +#define CRYPTOPP_NO_VTABLE __declspec(novtable)
577 +#define CRYPTOPP_NO_VTABLE
581 + // 4231: nonstandard extension used : 'extern' before template explicit instantiation
583 + // 4251: member needs to have dll-interface
584 + // 4275: base needs to have dll-interface
585 + // 4660: explicitly instantiating a class that's already implicitly instantiated
586 + // 4661: no suitable definition provided for explicit template instantiation request
587 + // 4786: identifer was truncated in debug information
588 + // 4355: 'this' : used in base member initializer list
589 + // 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
590 +# pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355 4910)
594 +// 8037: non-const function called for const object. needed to work around BCB2006 bug
598 +#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
599 +#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
602 +#ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
603 +#define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
606 +#ifdef CRYPTOPP_DISABLE_X86ASM // for backwards compatibility: this macro had both meanings
607 +#define CRYPTOPP_DISABLE_ASM
608 +#define CRYPTOPP_DISABLE_SSE2
611 +#if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))))
612 + #define CRYPTOPP_X86_ASM_AVAILABLE
614 + #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300)
615 + #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
617 + #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
620 + // 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.
621 + // GCC 4.1.2 was released on 2/13/2007, so we'll use that as a proxy for the binutils version.
622 + #if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102)
623 + #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
625 + #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
629 +#if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64)
630 + #define CRYPTOPP_X64_MASM_AVAILABLE
633 +#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__)
634 + #define CRYPTOPP_X64_ASM_AVAILABLE
637 +#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__))
638 + #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1
640 + #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
643 +#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
644 + #define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
646 + #define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
649 +// how to allocate 16-byte aligned memory (for SSE2)
650 +#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
651 + #define CRYPTOPP_MM_MALLOC_AVAILABLE
652 +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
653 + #define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
654 +#elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
655 + #define CRYPTOPP_MEMALIGN_AVAILABLE
657 + #define CRYPTOPP_NO_ALIGNED_ALLOC
660 +// how to disable inlining
661 +#if defined(_MSC_VER) && _MSC_VER >= 1300
662 +# define CRYPTOPP_NOINLINE_DOTDOTDOT
663 +# define CRYPTOPP_NOINLINE __declspec(noinline)
664 +#elif defined(__GNUC__)
665 +# define CRYPTOPP_NOINLINE_DOTDOTDOT
666 +# define CRYPTOPP_NOINLINE __attribute__((noinline))
668 +# define CRYPTOPP_NOINLINE_DOTDOTDOT ...
669 +# define CRYPTOPP_NOINLINE
672 +// how to declare class constants
673 +#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER)
674 +# define CRYPTOPP_CONSTANT(x) enum {x};
676 +# define CRYPTOPP_CONSTANT(x) static const int x;
679 +#if defined(_M_X64) || defined(__x86_64__)
680 + #define CRYPTOPP_BOOL_X64 1
682 + #define CRYPTOPP_BOOL_X64 0
685 +// see http://predef.sourceforge.net/prearch.html
686 +#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)
687 + #define CRYPTOPP_BOOL_X86 1
689 + #define CRYPTOPP_BOOL_X86 0
692 +#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || defined(__powerpc__)
693 + #define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
696 +#define CRYPTOPP_VERSION 560
698 +// ***************** determine availability of OS features ********************
700 +#ifndef NO_OS_DEPENDENCE
702 +#if defined(_WIN32) || defined(__CYGWIN__)
703 +#define CRYPTOPP_WIN32_AVAILABLE
706 +#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
707 +#define CRYPTOPP_UNIX_AVAILABLE
710 +#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
711 +# define HIGHRES_TIMER_AVAILABLE
714 +#ifdef CRYPTOPP_UNIX_AVAILABLE
715 +# define HAS_BERKELEY_STYLE_SOCKETS
718 +#ifdef CRYPTOPP_WIN32_AVAILABLE
719 +# define HAS_WINDOWS_STYLE_SOCKETS
722 +#if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS))
723 +# define SOCKETS_AVAILABLE
726 +#if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
727 +# define USE_WINDOWS_STYLE_SOCKETS
729 +# define USE_BERKELEY_STYLE_SOCKETS
732 +#if defined(HIGHRES_TIMER_AVAILABLE) && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
733 +# define WINDOWS_PIPES_AVAILABLE
736 +#if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI)
737 +# define NONBLOCKING_RNG_AVAILABLE
738 +# define OS_RNG_AVAILABLE
741 +#if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
742 +# define NONBLOCKING_RNG_AVAILABLE
743 +# define BLOCKING_RNG_AVAILABLE
744 +# define OS_RNG_AVAILABLE
745 +# define HAS_PTHREADS
746 +# define THREADS_AVAILABLE
749 +#ifdef CRYPTOPP_WIN32_AVAILABLE
750 +# define HAS_WINTHREADS
751 +# define THREADS_AVAILABLE
754 +#endif // NO_OS_DEPENDENCE
756 +// ***************** DLL related ********************
758 +#ifdef CRYPTOPP_WIN32_AVAILABLE
760 +#ifdef CRYPTOPP_EXPORTS
761 +#define CRYPTOPP_IS_DLL
762 +#define CRYPTOPP_DLL __declspec(dllexport)
763 +#elif defined(CRYPTOPP_IMPORTS)
764 +#define CRYPTOPP_IS_DLL
765 +#define CRYPTOPP_DLL __declspec(dllimport)
767 +#define CRYPTOPP_DLL
770 +#define CRYPTOPP_API __cdecl
772 +#else // CRYPTOPP_WIN32_AVAILABLE
774 +#define CRYPTOPP_DLL
775 +#define CRYPTOPP_API
777 +#endif // CRYPTOPP_WIN32_AVAILABLE
779 +#if defined(__MWERKS__)
780 +#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
781 +#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
782 +#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
784 +#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
787 +#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
788 +#define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
790 +#define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
793 +#if defined(__MWERKS__)
794 +#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
795 +#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
796 +#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
798 +#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
801 +#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
802 +#define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
804 +#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
808 --- /dev/null 2009-09-20 12:09:29.503935207 +0200
809 +++ debian/libcrypto++.pc.in 2009-09-20 18:51:50.000000000 +0200
812 +exec_prefix=@exec_prefix@
814 +includedir=@includedir@
817 +Description: General purpose cryptographic shared library
818 +URL: http://www.cryptopp.com