diff options
author | drochner <drochner> | 2010-02-03 10:58:11 +0000 |
---|---|---|
committer | drochner <drochner> | 2010-02-03 10:58:11 +0000 |
commit | ae7ac769caaceba486a5226692cca6d5451190e4 (patch) | |
tree | 42dd02d1eee12ce938906ae5984563f8b753a539 /security | |
parent | 555cefa2866609fbbf8855010d2bf472482b5284 (diff) | |
download | pkgsrc-ae7ac769caaceba486a5226692cca6d5451190e4.tar.gz |
add a patch from upstream CVS to fix a bug which could make keys
unusable on passphrase changes
bump PKGREVISION
Diffstat (limited to 'security')
-rw-r--r-- | security/gnupg2/Makefile | 4 | ||||
-rw-r--r-- | security/gnupg2/distinfo | 3 | ||||
-rw-r--r-- | security/gnupg2/patches/patch-am | 43 |
3 files changed, 47 insertions, 3 deletions
diff --git a/security/gnupg2/Makefile b/security/gnupg2/Makefile index 21e931a3af1..a9bbca690b7 100644 --- a/security/gnupg2/Makefile +++ b/security/gnupg2/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.27 2010/01/17 12:02:40 wiz Exp $ +# $NetBSD: Makefile,v 1.28 2010/02/03 10:58:11 drochner Exp $ # DISTNAME= gnupg-2.0.14 PKGNAME= ${DISTNAME:S/gnupg/gnupg2/} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= security MASTER_SITES= ftp://ftp.gnupg.org/gcrypt/gnupg/ EXTRACT_SUFX= .tar.bz2 diff --git a/security/gnupg2/distinfo b/security/gnupg2/distinfo index d97cdef76cb..47765c90b1b 100644 --- a/security/gnupg2/distinfo +++ b/security/gnupg2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2010/01/15 20:15:07 drochner Exp $ +$NetBSD: distinfo,v 1.17 2010/02/03 10:58:11 drochner Exp $ SHA1 (gnupg-2.0.14.tar.bz2) = cc5e4637f37f5bc82b00c73fc094ddadb7401821 RMD160 (gnupg-2.0.14.tar.bz2) = 3e5ecf0108b65f7d2ecfd6f61b81e04e526ba52f @@ -15,3 +15,4 @@ SHA1 (patch-ai) = 555b8768c30f470e98e5be62a4a4bea29eefdf78 SHA1 (patch-aj) = 20be6b455167962ffa556979d8d0f167dd14131e SHA1 (patch-ak) = 74b26ce441ea99ff28a09a3f0c643456daf48f35 SHA1 (patch-al) = ef7c698ed102c4e27bbf707ae5d1fce4c2b5d8d4 +SHA1 (patch-am) = 999cd57b90177df9d7c0510e3b8d11def7b47613 diff --git a/security/gnupg2/patches/patch-am b/security/gnupg2/patches/patch-am new file mode 100644 index 00000000000..c7c820d18f1 --- /dev/null +++ b/security/gnupg2/patches/patch-am @@ -0,0 +1,43 @@ +$NetBSD: patch-am,v 1.1 2010/02/03 10:58:11 drochner Exp $ + +--- agent/protect.c.orig 2009-12-14 18:51:50.000000000 +0000 ++++ agent/protect.c +@@ -360,19 +360,25 @@ do_encryption (const unsigned char *prot + + in canoncical format of course. We use asprintf and %n modifier + and dummy values as placeholders. */ +- p = xtryasprintf +- ("(9:protected%d:%s((4:sha18:%n_8bytes_2:96)%d:%n%*s)%d:%n%*s)", +- (int)strlen (modestr), modestr, +- &saltpos, +- blklen, &ivpos, blklen, "", +- enclen, &encpos, enclen, ""); +- if (!p) +- { +- gpg_error_t tmperr = out_of_core (); +- xfree (iv); +- xfree (outbuf); +- return tmperr; +- } ++ { ++ char countbuf[35]; ++ ++ snprintf (countbuf, sizeof countbuf, "%lu", get_standard_s2k_count ()); ++ p = xtryasprintf ++ ("(9:protected%d:%s((4:sha18:%n_8bytes_%u:%s)%d:%n%*s)%d:%n%*s)", ++ (int)strlen (modestr), modestr, ++ &saltpos, ++ (unsigned int)strlen (countbuf), countbuf, ++ blklen, &ivpos, blklen, "", ++ enclen, &encpos, enclen, ""); ++ if (!p) ++ { ++ gpg_error_t tmperr = out_of_core (); ++ xfree (iv); ++ xfree (outbuf); ++ return tmperr; ++ } ++ } + *resultlen = strlen (p); + *result = (unsigned char*)p; + memcpy (p+saltpos, iv+2*blklen, 8); |