head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.8 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.6 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.4 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.2 pkgsrc-2011Q2-base:1.2 pkgsrc-2010Q2:1.1.0.4 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.2 pkgsrc-2010Q1-base:1.1; locks; strict; comment @# @; 1.2 date 2010.09.01.16.46.41; author drochner; state dead; branches; next 1.1; 1.1 date 2010.02.03.10.58.11; author drochner; state Exp; branches; next ; desc @@ 1.2 log @update to 2.0.16 changes: -bugfixes -New command --passwd for GPG -Make use of libassuan 2.0 which is available as a DSO -The gpg-agent commands KILLAGENT and RELOADAGENT are now available on all platforms @ text @$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); @ 1.1 log @add a patch from upstream CVS to fix a bug which could make keys unusable on passphrase changes bump PKGREVISION @ text @d1 1 a1 1 $NetBSD$ @