summaryrefslogtreecommitdiff
path: root/security/gnupg2
diff options
context:
space:
mode:
authorshannonjr <shannonjr@pkgsrc.org>2007-02-05 11:43:01 +0000
committershannonjr <shannonjr@pkgsrc.org>2007-02-05 11:43:01 +0000
commit907f4916692bd2d69e77d67d18c4f87024fdeb26 (patch)
tree8bf2d0647ca22e225c54ac7a862667528d4cc0bf /security/gnupg2
parentf96aacfbe4a4f9b06ba7de9661dd6222494d51e7 (diff)
downloadpkgsrc-907f4916692bd2d69e77d67d18c4f87024fdeb26.tar.gz
Update to Version 2.0.2.
This is maintenance release to fix build problems found after the release of 2.0.1. There are also some minor enhancements.
Diffstat (limited to 'security/gnupg2')
-rw-r--r--security/gnupg2/Makefile4
-rw-r--r--security/gnupg2/distinfo12
-rw-r--r--security/gnupg2/patches/patch-ac6
-rw-r--r--security/gnupg2/patches/patch-ah250
4 files changed, 136 insertions, 136 deletions
diff --git a/security/gnupg2/Makefile b/security/gnupg2/Makefile
index fa1e1c919c9..cbec043e05d 100644
--- a/security/gnupg2/Makefile
+++ b/security/gnupg2/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2006/12/12 13:11:35 shannonjr Exp $
+# $NetBSD: Makefile,v 1.9 2007/02/05 11:43:01 shannonjr Exp $
#
-DISTNAME= gnupg-2.0.1
+DISTNAME= gnupg-2.0.2
PKGNAME= ${DISTNAME:S/gnupg/gnupg2/}
CATEGORIES= security
MASTER_SITES= ftp://ftp.gnupg.org/gcrypt/gnupg/
diff --git a/security/gnupg2/distinfo b/security/gnupg2/distinfo
index 85f294b714f..9e598b481f5 100644
--- a/security/gnupg2/distinfo
+++ b/security/gnupg2/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.5 2006/12/18 07:14:51 smb Exp $
+$NetBSD: distinfo,v 1.6 2007/02/05 11:43:01 shannonjr Exp $
-SHA1 (gnupg-2.0.1.tar.bz2) = ec84ffb1d2ac013dc0afb5bdf8b9df2c838673e9
-RMD160 (gnupg-2.0.1.tar.bz2) = 3b9252b9b8b1ff5c242a3e541adc0a9700e55df1
-Size (gnupg-2.0.1.tar.bz2) = 3923924 bytes
+SHA1 (gnupg-2.0.2.tar.bz2) = 1a3165c5b601f3244b8885143d02bea4210495e3
+RMD160 (gnupg-2.0.2.tar.bz2) = 6cc52da761927e17842842c00598c4974208affa
+Size (gnupg-2.0.2.tar.bz2) = 3969476 bytes
SHA1 (libassuan-1.0.0.tar.bz2) = 5256d74a80619779a9802305a9f1ad7fd04277a1
RMD160 (libassuan-1.0.0.tar.bz2) = 63b0cc77eb731ccd635e51543001a675c15a835f
Size (libassuan-1.0.0.tar.bz2) = 260201 bytes
@@ -11,8 +11,8 @@ RMD160 (pth-2.0.7.tar.gz) = 80bc66777ba20d9648b7aaf3f58d593be6416910
Size (pth-2.0.7.tar.gz) = 652640 bytes
SHA1 (patch-aa) = 916346ad387ae4efd638b2c19bbedfe6f309eb2e
SHA1 (patch-ab) = 501bce9a8474ac37a8e01eceae9b52f0e87868d5
-SHA1 (patch-ac) = ca9e1044a0eb8d3e25cd9c20174047a96038c236
+SHA1 (patch-ac) = 8baffc127ae84ef0a3e8a68bb84c69489be3ac1f
SHA1 (patch-af) = 04fdcbf19c4d530fc735c04dd785c07692d8b96d
-SHA1 (patch-ah) = 0b97e13ed0a8d4f1707b839520b1f8702cadacab
+SHA1 (patch-ah) = 9a92310b97daa47d18dfd01b9f7b40d35c9a2317
SHA1 (patch-ai) = e3662ca1bde0c1946fdb6cbd7fc2033cc54bdd8d
SHA1 (patch-aj) = 74773dd799b69be05896cf6afcc406d767360f87
diff --git a/security/gnupg2/patches/patch-ac b/security/gnupg2/patches/patch-ac
index 13127aee5a8..d2ed48a28e5 100644
--- a/security/gnupg2/patches/patch-ac
+++ b/security/gnupg2/patches/patch-ac
@@ -1,10 +1,10 @@
-$NetBSD: patch-ac,v 1.1.1.1 2006/11/17 12:13:11 shannonjr Exp $
+$NetBSD: patch-ac,v 1.2 2007/02/05 11:43:01 shannonjr Exp $
---- common/Makefile.am.orig 2006-10-17 05:49:02.000000000 -0600
+--- common/Makefile.am.orig 2007-01-31 05:11:51.000000000 -0700
+++ common/Makefile.am
@@ -26,7 +26,7 @@ TESTS = $(module_tests)
- AM_CPPFLAGS = -I$(top_srcdir)/gl
+ AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl
-AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
+AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS)
diff --git a/security/gnupg2/patches/patch-ah b/security/gnupg2/patches/patch-ah
index 54c365c3ca2..90917bb26d0 100644
--- a/security/gnupg2/patches/patch-ah
+++ b/security/gnupg2/patches/patch-ah
@@ -1,249 +1,249 @@
-$NetBSD: patch-ah,v 1.1 2006/12/09 13:39:28 shannonjr Exp $
+$NetBSD: patch-ah,v 1.2 2007/02/05 11:43:01 shannonjr Exp $
---- ./g10/encr-data.c.orig 2006-10-02 04:50:13.000000000 -0600
+--- ./g10/encr-data.c.orig 2006-12-02 09:22:04.000000000 -0700
+++ ./g10/encr-data.c
-@@ -39,14 +39,35 @@ static int mdc_decode_filter ( void *opa
+@@ -39,35 +39,14 @@ static int mdc_decode_filter ( void *opa
static int decode_filter ( void *opaque, int control, IOBUF a,
byte *buf, size_t *ret_len);
--typedef struct
-+typedef struct decode_filter_context_s
+-typedef struct decode_filter_context_s
++typedef struct
{
gcry_cipher_hd_t cipher_hd;
gcry_md_hd_t mdc_hash;
char defer[22];
int defer_filled;
int eof_seen;
--} decode_filter_ctx_t;
-+ int refcount;
-+} *decode_filter_ctx_t;
-+
-+
-+/* Helper to release the decode context. */
-+static void
-+release_dfx_context (decode_filter_ctx_t dfx)
-+{
-+ if (!dfx)
-+ return;
-+
-+ assert (dfx->refcount);
-+ if ( !--dfx->refcount )
-+ {
-+ gcry_cipher_close (dfx->cipher_hd);
-+ dfx->cipher_hd = NULL;
-+ gcry_md_close (dfx->mdc_hash);
-+ dfx->mdc_hash = NULL;
-+ xfree (dfx);
-+ }
-+}
-+
+- int refcount;
+-} *decode_filter_ctx_t;
+-
+-
+-/* Helper to release the decode context. */
+-static void
+-release_dfx_context (decode_filter_ctx_t dfx)
+-{
+- if (!dfx)
+- return;
+-
+- assert (dfx->refcount);
+- if ( !--dfx->refcount )
+- {
+- gcry_cipher_close (dfx->cipher_hd);
+- dfx->cipher_hd = NULL;
+- gcry_md_close (dfx->mdc_hash);
+- dfx->mdc_hash = NULL;
+- xfree (dfx);
+- }
+-}
+-
++} decode_filter_ctx_t;
/****************
-@@ -62,7 +83,11 @@ decrypt_data( void *procctx, PKT_encrypt
+@@ -83,11 +62,7 @@ decrypt_data( void *procctx, PKT_encrypt
unsigned blocksize;
unsigned nprefix;
-- memset( &dfx, 0, sizeof dfx );
-+ dfx = xtrycalloc (1, sizeof *dfx);
-+ if (!dfx)
-+ return gpg_error_from_syserror ();
-+ dfx->refcount = 1;
-+
+- dfx = xtrycalloc (1, sizeof *dfx);
+- if (!dfx)
+- return gpg_error_from_syserror ();
+- dfx->refcount = 1;
+-
++ memset( &dfx, 0, sizeof dfx );
if ( opt.verbose && !dek->algo_info_printed )
{
const char *s = gcry_cipher_algo_name (dek->algo);
-@@ -77,20 +102,20 @@ decrypt_data( void *procctx, PKT_encrypt
+@@ -102,20 +77,20 @@ decrypt_data( void *procctx, PKT_encrypt
goto leave;
blocksize = gcry_cipher_get_algo_blklen (dek->algo);
if ( !blocksize || blocksize > 16 )
-- log_fatal("unsupported blocksize %u\n", blocksize );
-+ log_fatal ("unsupported blocksize %u\n", blocksize );
+- log_fatal ("unsupported blocksize %u\n", blocksize );
++ log_fatal("unsupported blocksize %u\n", blocksize );
nprefix = blocksize;
if ( ed->len && ed->len < (nprefix+2) )
BUG();
if ( ed->mdc_method )
{
-- if (gcry_md_open (&dfx.mdc_hash, ed->mdc_method, 0 ))
-+ if (gcry_md_open (&dfx->mdc_hash, ed->mdc_method, 0 ))
+- if (gcry_md_open (&dfx->mdc_hash, ed->mdc_method, 0 ))
++ if (gcry_md_open (&dfx.mdc_hash, ed->mdc_method, 0 ))
BUG ();
if ( DBG_HASHING )
-- gcry_md_start_debug (dfx.mdc_hash, "checkmdc");
-+ gcry_md_start_debug (dfx->mdc_hash, "checkmdc");
+- gcry_md_start_debug (dfx->mdc_hash, "checkmdc");
++ gcry_md_start_debug (dfx.mdc_hash, "checkmdc");
}
-- rc = gcry_cipher_open (&dfx.cipher_hd, dek->algo,
-+ rc = gcry_cipher_open (&dfx->cipher_hd, dek->algo,
+- rc = gcry_cipher_open (&dfx->cipher_hd, dek->algo,
++ rc = gcry_cipher_open (&dfx.cipher_hd, dek->algo,
GCRY_CIPHER_MODE_CFB,
(GCRY_CIPHER_SECURE
| ((ed->mdc_method || dek->algo >= 100)?
-@@ -104,7 +129,7 @@ decrypt_data( void *procctx, PKT_encrypt
+@@ -129,7 +104,7 @@ decrypt_data( void *procctx, PKT_encrypt
/* log_hexdump( "thekey", dek->key, dek->keylen );*/
-- rc = gcry_cipher_setkey (dfx.cipher_hd, dek->key, dek->keylen);
-+ rc = gcry_cipher_setkey (dfx->cipher_hd, dek->key, dek->keylen);
+- rc = gcry_cipher_setkey (dfx->cipher_hd, dek->key, dek->keylen);
++ rc = gcry_cipher_setkey (dfx.cipher_hd, dek->key, dek->keylen);
if ( gpg_err_code (rc) == GPG_ERR_WEAK_KEY )
{
log_info(_("WARNING: message was encrypted with"
-@@ -123,7 +148,7 @@ decrypt_data( void *procctx, PKT_encrypt
+@@ -148,7 +123,7 @@ decrypt_data( void *procctx, PKT_encrypt
goto leave;
}
-- gcry_cipher_setiv (dfx.cipher_hd, NULL, 0);
-+ gcry_cipher_setiv (dfx->cipher_hd, NULL, 0);
+- gcry_cipher_setiv (dfx->cipher_hd, NULL, 0);
++ gcry_cipher_setiv (dfx.cipher_hd, NULL, 0);
if ( ed->len )
{
-@@ -144,8 +169,8 @@ decrypt_data( void *procctx, PKT_encrypt
+@@ -169,8 +144,8 @@ decrypt_data( void *procctx, PKT_encrypt
temp[i] = c;
}
-- gcry_cipher_decrypt (dfx.cipher_hd, temp, nprefix+2, NULL, 0);
-- gcry_cipher_sync (dfx.cipher_hd);
-+ gcry_cipher_decrypt (dfx->cipher_hd, temp, nprefix+2, NULL, 0);
-+ gcry_cipher_sync (dfx->cipher_hd);
+- gcry_cipher_decrypt (dfx->cipher_hd, temp, nprefix+2, NULL, 0);
+- gcry_cipher_sync (dfx->cipher_hd);
++ gcry_cipher_decrypt (dfx.cipher_hd, temp, nprefix+2, NULL, 0);
++ gcry_cipher_sync (dfx.cipher_hd);
p = temp;
/* log_hexdump( "prefix", temp, nprefix+2 ); */
if (dek->symmetric
-@@ -155,17 +180,18 @@ decrypt_data( void *procctx, PKT_encrypt
+@@ -180,18 +155,17 @@ decrypt_data( void *procctx, PKT_encrypt
goto leave;
}
-- if ( dfx.mdc_hash )
-- gcry_md_write (dfx.mdc_hash, temp, nprefix+2);
--
-+ if ( dfx->mdc_hash )
-+ gcry_md_write (dfx->mdc_hash, temp, nprefix+2);
-+
-+ dfx->refcount++;
+- if ( dfx->mdc_hash )
+- gcry_md_write (dfx->mdc_hash, temp, nprefix+2);
+-
+- dfx->refcount++;
++ if ( dfx.mdc_hash )
++ gcry_md_write (dfx.mdc_hash, temp, nprefix+2);
++
if ( ed->mdc_method )
-- iobuf_push_filter( ed->buf, mdc_decode_filter, &dfx );
-+ iobuf_push_filter ( ed->buf, mdc_decode_filter, dfx );
+- iobuf_push_filter ( ed->buf, mdc_decode_filter, dfx );
++ iobuf_push_filter( ed->buf, mdc_decode_filter, &dfx );
else
-- iobuf_push_filter( ed->buf, decode_filter, &dfx );
-+ iobuf_push_filter ( ed->buf, decode_filter, dfx );
+- iobuf_push_filter ( ed->buf, decode_filter, dfx );
++ iobuf_push_filter( ed->buf, decode_filter, &dfx );
proc_packets ( procctx, ed->buf );
ed->buf = NULL;
-- if ( ed->mdc_method && dfx.eof_seen == 2 )
-+ if ( ed->mdc_method && dfx->eof_seen == 2 )
+- if ( ed->mdc_method && dfx->eof_seen == 2 )
++ if ( ed->mdc_method && dfx.eof_seen == 2 )
rc = gpg_error (GPG_ERR_INV_PACKET);
else if ( ed->mdc_method )
{
-@@ -184,26 +210,28 @@ decrypt_data( void *procctx, PKT_encrypt
+@@ -210,28 +184,26 @@ decrypt_data( void *procctx, PKT_encrypt
bytes are appended. */
int datalen = gcry_md_get_algo_dlen (ed->mdc_method);
-- gcry_cipher_decrypt (dfx.cipher_hd, dfx.defer, 22, NULL, 0);
-- gcry_md_write (dfx.mdc_hash, dfx.defer, 2);
-- gcry_md_final (dfx.mdc_hash);
-+ assert (dfx->cipher_hd);
-+ assert (dfx->mdc_hash);
-+ gcry_cipher_decrypt (dfx->cipher_hd, dfx->defer, 22, NULL, 0);
-+ gcry_md_write (dfx->mdc_hash, dfx->defer, 2);
-+ gcry_md_final (dfx->mdc_hash);
+- assert (dfx->cipher_hd);
+- assert (dfx->mdc_hash);
+- gcry_cipher_decrypt (dfx->cipher_hd, dfx->defer, 22, NULL, 0);
+- gcry_md_write (dfx->mdc_hash, dfx->defer, 2);
+- gcry_md_final (dfx->mdc_hash);
++ gcry_cipher_decrypt (dfx.cipher_hd, dfx.defer, 22, NULL, 0);
++ gcry_md_write (dfx.mdc_hash, dfx.defer, 2);
++ gcry_md_final (dfx.mdc_hash);
-- if (dfx.defer[0] != '\xd3' || dfx.defer[1] != '\x14' )
-+ if (dfx->defer[0] != '\xd3' || dfx->defer[1] != '\x14' )
+- if (dfx->defer[0] != '\xd3' || dfx->defer[1] != '\x14' )
++ if (dfx.defer[0] != '\xd3' || dfx.defer[1] != '\x14' )
{
log_error("mdc_packet with invalid encoding\n");
rc = gpg_error (GPG_ERR_INV_PACKET);
}
else if (datalen != 20
-- || memcmp (gcry_md_read (dfx.mdc_hash, 0),dfx.defer+2,datalen))
-+ || memcmp (gcry_md_read (dfx->mdc_hash, 0),
-+ dfx->defer+2,datalen ))
+- || memcmp (gcry_md_read (dfx->mdc_hash, 0),
+- dfx->defer+2,datalen ))
++ || memcmp (gcry_md_read (dfx.mdc_hash, 0),dfx.defer+2,datalen))
rc = gpg_error (GPG_ERR_BAD_SIGNATURE);
-- /* log_printhex("MDC message:", dfx.defer, 22); */
-- /* log_printhex("MDC calc:", gcry_md_read (dfx.mdc_hash,0), datalen); */
-+ /* log_printhex("MDC message:", dfx->defer, 22); */
-+ /* log_printhex("MDC calc:", gcry_md_read (dfx->mdc_hash,0), datalen); */
+- /* log_printhex("MDC message:", dfx->defer, 22); */
+- /* log_printhex("MDC calc:", gcry_md_read (dfx->mdc_hash,0), datalen); */
++ /* log_printhex("MDC message:", dfx.defer, 22); */
++ /* log_printhex("MDC calc:", gcry_md_read (dfx.mdc_hash,0), datalen); */
}
leave:
-- gcry_cipher_close (dfx.cipher_hd);
-- gcry_md_close (dfx.mdc_hash);
-+ release_dfx_context (dfx);
+- release_dfx_context (dfx);
++ gcry_cipher_close (dfx.cipher_hd);
++ gcry_md_close (dfx.mdc_hash);
return rc;
}
-@@ -214,7 +242,7 @@ static int
+@@ -242,7 +214,7 @@ static int
mdc_decode_filter (void *opaque, int control, IOBUF a,
byte *buf, size_t *ret_len)
{
-- decode_filter_ctx_t *dfx = opaque;
-+ decode_filter_ctx_t dfx = opaque;
+- decode_filter_ctx_t dfx = opaque;
++ decode_filter_ctx_t *dfx = opaque;
size_t n, size = *ret_len;
int rc = 0;
int c;
-@@ -226,11 +254,11 @@ mdc_decode_filter (void *opaque, int con
+@@ -254,11 +226,11 @@ mdc_decode_filter (void *opaque, int con
}
else if( control == IOBUFCTRL_UNDERFLOW )
{
-- assert(a);
-- assert( size > 44 );
-+ assert (a);
-+ assert ( size > 44 );
+- assert (a);
+- assert ( size > 44 );
++ assert(a);
++ assert( size > 44 );
/* Get at least 22 bytes and put it somewhere ahead in the buffer. */
-- for(n=22; n < 44 ; n++ )
-+ for (n=22; n < 44 ; n++ )
+- for (n=22; n < 44 ; n++ )
++ for(n=22; n < 44 ; n++ )
{
if( (c = iobuf_get(a)) == -1 )
break;
-@@ -279,8 +307,10 @@ mdc_decode_filter (void *opaque, int con
+@@ -307,10 +279,8 @@ mdc_decode_filter (void *opaque, int con
if ( n )
{
-- gcry_cipher_decrypt (dfx->cipher_hd, buf, n, NULL, 0);
-- gcry_md_write (dfx->mdc_hash, buf, n);
-+ if ( dfx->cipher_hd )
-+ gcry_cipher_decrypt (dfx->cipher_hd, buf, n, NULL, 0);
-+ if ( dfx->mdc_hash )
-+ gcry_md_write (dfx->mdc_hash, buf, n);
+- if ( dfx->cipher_hd )
+- gcry_cipher_decrypt (dfx->cipher_hd, buf, n, NULL, 0);
+- if ( dfx->mdc_hash )
+- gcry_md_write (dfx->mdc_hash, buf, n);
++ gcry_cipher_decrypt (dfx->cipher_hd, buf, n, NULL, 0);
++ gcry_md_write (dfx->mdc_hash, buf, n);
}
else
{
-@@ -289,6 +319,10 @@ mdc_decode_filter (void *opaque, int con
+@@ -319,10 +289,6 @@ mdc_decode_filter (void *opaque, int con
}
*ret_len = n;
}
-+ else if ( control == IOBUFCTRL_FREE )
-+ {
-+ release_dfx_context (dfx);
-+ }
+- else if ( control == IOBUFCTRL_FREE )
+- {
+- release_dfx_context (dfx);
+- }
else if ( control == IOBUFCTRL_DESC )
{
*(char**)buf = "mdc_decode_filter";
-@@ -300,7 +334,7 @@ mdc_decode_filter (void *opaque, int con
+@@ -334,7 +300,7 @@ mdc_decode_filter (void *opaque, int con
static int
decode_filter( void *opaque, int control, IOBUF a, byte *buf, size_t *ret_len)
{
-- decode_filter_ctx_t *fc = opaque;
-+ decode_filter_ctx_t fc = opaque;
+- decode_filter_ctx_t fc = opaque;
++ decode_filter_ctx_t *fc = opaque;
size_t n, size = *ret_len;
int rc = 0;
-@@ -311,11 +345,18 @@ decode_filter( void *opaque, int control
+@@ -345,18 +311,11 @@ decode_filter( void *opaque, int control
if ( n == -1 )
n = 0;
if ( n )
-- gcry_cipher_decrypt (fc->cipher_hd, buf, n, NULL, 0);
-+ {
-+ if (fc->cipher_hd)
-+ gcry_cipher_decrypt (fc->cipher_hd, buf, n, NULL, 0);
-+ }
+- {
+- if (fc->cipher_hd)
+- gcry_cipher_decrypt (fc->cipher_hd, buf, n, NULL, 0);
+- }
++ gcry_cipher_decrypt (fc->cipher_hd, buf, n, NULL, 0);
else
rc = -1; /* EOF */
*ret_len = n;
}
-+ else if ( control == IOBUFCTRL_FREE )
-+ {
-+ release_dfx_context (fc);
-+ }
+- else if ( control == IOBUFCTRL_FREE )
+- {
+- release_dfx_context (fc);
+- }
else if ( control == IOBUFCTRL_DESC )
{
*(char**)buf = "decode_filter";