Update to 1.5.2.

XXX: lots of patches without comments, and not upstreamed it seems.

Noteworthy changes in version 1.5.2 (2013-04-18)
------------------------------------------------

 * Added support for IDEA.

 * Made the Padlock code work again (regression since 1.5.0).

 * Fixed alignment problems for Serpent.

 * Fixed two bugs in ECC computations.
This commit is contained in:
wiz 2013-04-21 14:44:53 +00:00
parent 2c416dc4f9
commit e96262698f
7 changed files with 8 additions and 123 deletions

View file

@ -1,13 +1,10 @@
# $NetBSD: Makefile,v 1.55 2013/04/10 15:17:55 drochner Exp $
# $NetBSD: Makefile,v 1.56 2013/04/21 14:44:53 wiz Exp $
DISTNAME= libgcrypt-1.5.1
DISTNAME= libgcrypt-1.5.2
CATEGORIES= security
MASTER_SITES= ftp://ftp.gnupg.org/gcrypt/libgcrypt/ \
http://gd.tuwien.ac.at/privacy/gnupg/libgcrypt/
EXTRACT_SUFX= .tar.bz2
# don't remove this -- see options.mk
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
DIST_SUBDIR= ${PKGNAME_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://directory.fsf.org/project/libgcrypt/

View file

@ -1,17 +1,11 @@
$NetBSD: distinfo,v 1.37 2013/04/11 17:08:38 drochner Exp $
$NetBSD: distinfo,v 1.38 2013/04/21 14:44:53 wiz Exp $
SHA1 (libgcrypt-1.5.1/gcrypt.tar.bz2) = 5d402e4e4e6831f74b738f1a022cf024bcb24ecd
RMD160 (libgcrypt-1.5.1/gcrypt.tar.bz2) = d1032e66bd4b6f51e437993a7178d14b09a2955a
Size (libgcrypt-1.5.1/gcrypt.tar.bz2) = 4231 bytes
SHA1 (libgcrypt-1.5.1/libgcrypt-1.5.1.tar.bz2) = 8b60a26b7eae1a727d58932d6b1efeb5716648ed
RMD160 (libgcrypt-1.5.1/libgcrypt-1.5.1.tar.bz2) = f074d35b749e636bc18ceef01fc6fb9cf3d1e6a3
Size (libgcrypt-1.5.1/libgcrypt-1.5.1.tar.bz2) = 1503471 bytes
SHA1 (libgcrypt-1.5.2.tar.bz2) = c9998383532ba3e8bcaf690f2f0d65e814b48d2f
RMD160 (libgcrypt-1.5.2.tar.bz2) = 0f387dcd4169284c2e1ba9b74d2a0367fba640e5
Size (libgcrypt-1.5.2.tar.bz2) = 1507418 bytes
SHA1 (patch-aa) = 7c46612f912d45dfd4ce4f4b510e72c00bd38585
SHA1 (patch-ab) = 6fac21daa26b7de3b13839d076f78a74400efce7
SHA1 (patch-ac) = c59d7bb73fa0e79522b287054633e276ffbb069d
SHA1 (patch-ad) = 19345b7d164521d526a44eb3f1a465ff09d8266c
SHA1 (patch-ae) = 50eeea5a193e14012e0d127a0618dfc03727d96c
SHA1 (patch-af) = e6d33b3e9c25a560c1df11843c6be3c9319bd018
SHA1 (patch-ba) = a39a6972d197193ea7831d23cfa66f14ca55105e
SHA1 (patch-bb) = b75a2cb6d526976bb4d3a0948ce4c15eead4e2ae
SHA1 (patch-bc) = 86b594ac2ee25d8a68809765a13942e8fd3be051

View file

@ -1,53 +0,0 @@
$NetBSD: idea-patch,v 1.1 2009/12/18 18:54:24 drochner Exp $
--- idea.c.orig 2006-11-15 15:43:12.000000000 +0000
+++ idea.c
@@ -49,8 +49,11 @@ typedef struct {
int have_dk;
} IDEA_context;
+static void expand_key(const byte *, u16 *);
+static void invert_key(u16 *, u16[IDEA_KEYLEN]);
+
static int
-do_idea_setkey( IDEA_context *c, byte *key, unsigned int keylen )
+do_idea_setkey( IDEA_context *c, const byte *key, unsigned int keylen )
{
assert(keylen == 16);
c->have_dk = 0;
@@ -98,7 +101,7 @@ mul_inv( u16 x )
static void
-expand_key( byte *userkey, u16 *ek )
+expand_key( const byte *userkey, u16 *ek )
{
int i,j;
@@ -161,7 +164,7 @@ invert_key( u16 *ek, u16 dk[IDEA_KEYLEN]
static void
-cipher( byte *outbuf, byte *inbuf, u16 *key )
+cipher( byte *outbuf, const byte *inbuf, u16 *key )
{
u16 x1, x2, x3,x4, s2, s3;
u16 *in, *out;
@@ -237,7 +240,7 @@ cipher( byte *outbuf, byte *inbuf, u16 *
}
static void
-do_idea_encrypt( IDEA_context *c, byte *outbuf, byte *inbuf )
+do_idea_encrypt( IDEA_context *c, byte *outbuf, const byte *inbuf )
{
cipher( outbuf, inbuf, c->ek );
}
@@ -251,7 +254,7 @@ idea_encrypt (void *context, byte *out,
}
static void
-do_idea_decrypt( IDEA_context *c, byte *outbuf, byte *inbuf )
+do_idea_decrypt( IDEA_context *c, byte *outbuf, const byte *inbuf )
{
if( !c->have_dk ) {
c->have_dk = 1;

View file

@ -1,7 +1,7 @@
# $NetBSD: options.mk,v 1.7 2012/01/20 17:07:38 drochner Exp $
# $NetBSD: options.mk,v 1.8 2013/04/21 14:44:53 wiz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.libgcrypt
PKG_SUPPORTED_OPTIONS= idea
PKG_SUPPORTED_OPTIONS=
.include "../../mk/bsd.prefs.mk"
@ -24,16 +24,3 @@ PKG_SUGGESTED_OPTIONS+= via-padlock
# Disable VIA Padlock support.
CONFIGURE_ARGS+= --disable-padlock-support
.endif
.if !empty(PKG_OPTIONS:Midea)
# use of IDEA as crypto function
DISTFILES+= gcrypt.tar.bz2
SITES.gcrypt.tar.bz2= http://www.kfwebs.com/
CFLAGS+= -DUSE_IDEA
MAKE_ENV+= IDEAOBJECT=idea.lo
USE_TOOLS+= patch
post-patch: ideapatch
ideapatch:
cd ${WRKDIR} && ${PATCH} <${FILESDIR}/idea-patch && \
${CP} idea.c ${WRKSRC}/cipher
.endif

View file

@ -1,15 +0,0 @@
$NetBSD: patch-ba,v 1.2 2011/07/13 21:21:52 adam Exp $
--- cipher/cipher.c.orig 2009-04-02 09:25:34.000000000 +0000
+++ cipher/cipher.c
@@ -112,6 +112,10 @@ static struct cipher_table_entry
{ &_gcry_cipher_spec_camellia256,
&dummy_extra_spec, GCRY_CIPHER_CAMELLIA256 },
#endif
+#if USE_IDEA
+ { &_gcry_cipher_spec_idea,
+ &dummy_extra_spec, GCRY_CIPHER_IDEA },
+#endif
{ NULL }
};

View file

@ -1,12 +0,0 @@
$NetBSD: patch-bb,v 1.2 2011/07/13 21:21:52 adam Exp $
--- src/cipher.h.orig 2009-04-02 09:25:32.000000000 +0000
+++ src/cipher.h
@@ -135,6 +135,7 @@ extern gcry_cipher_spec_t _gcry_cipher_s
extern gcry_cipher_spec_t _gcry_cipher_spec_camellia128;
extern gcry_cipher_spec_t _gcry_cipher_spec_camellia192;
extern gcry_cipher_spec_t _gcry_cipher_spec_camellia256;
+extern gcry_cipher_spec_t _gcry_cipher_spec_idea;
extern cipher_extra_spec_t _gcry_cipher_extraspec_tripledes;
extern cipher_extra_spec_t _gcry_cipher_extraspec_aes;

View file

@ -1,13 +0,0 @@
$NetBSD: patch-bc,v 1.2 2011/07/13 21:21:52 adam Exp $
--- cipher/Makefile.in.orig 2011-06-29 08:58:00.000000000 +0000
+++ cipher/Makefile.in
@@ -252,7 +252,7 @@ EXTRA_DIST = Manifest
AM_CPPFLAGS = -I../src -I$(top_srcdir)/src
AM_CFLAGS = $(GPG_ERROR_CFLAGS)
noinst_LTLIBRARIES = libcipher.la
-GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@
+GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@ ${IDEAOBJECT}
libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES)
libcipher_la_LIBADD = $(GCRYPT_MODULES)
libcipher_la_SOURCES = \