RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [email protected] Module: rpm Date: 10-Jun-2010 21:46:58 Branch: HEAD Handle: 2010061019465601 Modified files: rpm CHANGES rpm/rpmio librpmio.vers poptIO.c rpmpgp.c Log: - crypto: add --usecrypto options for libtomcrypt/cdsa. Summary: Revision Changes Path 1.3387 +1 -0 rpm/CHANGES 2.183 +2 -0 rpm/rpmio/librpmio.vers 1.88 +22 -5 rpm/rpmio/poptIO.c 2.121 +8 -0 rpm/rpmio/rpmpgp.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3386 -r1.3387 CHANGES --- rpm/CHANGES 10 Jun 2010 19:22:28 -0000 1.3386 +++ rpm/CHANGES 10 Jun 2010 19:46:56 -0000 1.3387 @@ -1,4 +1,5 @@ 5.3.0 -> 5.4a1: + - jbj: crypto: add --usecrypto options for libtomcrypt/cdsa. - jbj: crypto: stub in wrappers for libtomcrypt & Apple CDSA. - jbj: autofu: detect libtomcrypt (with custom tomcrypt.pc). - jbj: pgp: add ECDSA generate/sign/verify tests using gcrypt/openssl. @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/librpmio.vers ============================================================================ $ cvs diff -u -r2.182 -r2.183 librpmio.vers --- rpm/rpmio/librpmio.vers 1 Jun 2010 20:08:37 -0000 2.182 +++ rpm/rpmio/librpmio.vers 10 Jun 2010 19:46:57 -0000 2.183 @@ -312,6 +312,7 @@ rpmbfIntersect; rpmbfParams; rpmbfUnion; + rpmcdsaImplVecs; _rpmcudf_debug; rpmcudfFree; rpmcudfHasPreamble; @@ -455,6 +456,7 @@ rpmlogGetCallback; rpmlogSetFile; rpmlogSetMask; + rpmltcImplVecs; rpmluaFiles; rpmluaPath; rpmluaCheckScript; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/poptIO.c ============================================================================ $ cvs diff -u -r1.87 -r1.88 poptIO.c --- rpm/rpmio/poptIO.c 19 May 2010 14:57:35 -0000 1.87 +++ rpm/rpmio/poptIO.c 10 Jun 2010 19:46:57 -0000 1.88 @@ -7,23 +7,24 @@ #include <poptIO.h> -#define _RPMPGP_INTERNAL #if defined(WITH_BEECRYPT) -#define _RPMBC_INTERNAL #include <rpmbc.h> #endif +#if defined(WITH_CDSA) +#include <rpmcdsa.h> +#endif #if defined(WITH_GCRYPT) -#define _RPMGC_INTERNAL #include <rpmgc.h> #endif #if defined(WITH_NSS) -#define _RPMNSS_INTERNAL #include <rpmnss.h> #endif #if defined(WITH_SSL) -#define _RPMSSL_INTERNAL #include <rpmssl.h> #endif +#if defined(WITH_TOMCRYPT) +#include <rpmltc.h> +#endif #include <rpmbf.h> @@ -460,6 +461,14 @@ exit(EXIT_FAILURE); #endif } + else if (!xstrcasecmp(val, "tomcrypt") || !xstrcasecmp(val, "ltc")) { +#if defined(WITH_TOMCRYPT) + pgpImplVecs = &rpmltcImplVecs; +#else + rpmlog(RPMLOG_ERR, "TomCrypt (\"tomcrypt\") based cryptography implementation not available\n"); + exit(EXIT_FAILURE); +#endif + } else if (!xstrcasecmp(val, "NSS")) { #if defined(WITH_NSS) pgpImplVecs = &rpmnssImplVecs; @@ -476,6 +485,14 @@ exit(EXIT_FAILURE); #endif } + else if (!xstrcasecmp(val, "CDSA")) { +#if defined(WITH_CDSA) + pgpImplVecs = &rpmcdsaImplVecs; +#else + rpmlog(RPMLOG_ERR, "CDSA (\"cdsa\") based cryptography implementation not available\n"); + exit(EXIT_FAILURE); +#endif + } else { rpmlog(RPMLOG_ERR, "cryptography implementation \"%s\" not known\n", val); exit(EXIT_FAILURE); @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmpgp.c ============================================================================ $ cvs diff -u -r2.120 -r2.121 rpmpgp.c --- rpm/rpmio/rpmpgp.c 1 Jun 2010 20:08:37 -0000 2.120 +++ rpm/rpmio/rpmpgp.c 10 Jun 2010 19:46:57 -0000 2.121 @@ -42,6 +42,10 @@ &rpmnssImplVecs; #elif defined(USE_CRYPTO_OPENSSL) && defined(WITH_SSL) &rpmsslImplVecs; +#elif defined(USE_CRYPTO_CDSA) && defined(WITH_CDSA) + &rpmcdsaImplVecs; +#elif defined(USE_CRYPTO_TOMCRYPT) && defined(WITH_TOMCRYPT) + &rpmltcImplVecs; /* implict selection (order DOES matter) */ #elif defined(WITH_BEECRYPT) &rpmbcImplVecs; @@ -51,6 +55,10 @@ &rpmnssImplVecs; #elif defined(WITH_SSL) &rpmsslImplVecs; +#elif defined(WITH_CDSA) + &rpmcdsaImplVecs; +#elif defined(WITH_TOMCRYPT) + &rpmltcImplVecs; #else #error INTERNAL ERROR: no suitable Cryptography library available #endif @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository [email protected]
