diff --git a/gnupg-files-are-digests.patch b/gnupg-files-are-digests.patch index 5a6e760..5f06508 100644 --- a/gnupg-files-are-digests.patch +++ b/gnupg-files-are-digests.patch @@ -1,14 +1,14 @@ --- - g10/gpg.c | 4 +++ + g10/gpg.c | 3 ++ g10/options.h | 1 g10/sign.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- - 3 files changed, 66 insertions(+), 5 deletions(-) + 3 files changed, 65 insertions(+), 5 deletions(-) -Index: gnupg-2.0.14/g10/gpg.c +Index: gnupg-2.0.13/g10/gpg.c =================================================================== ---- gnupg-2.0.14.orig/g10/gpg.c 2009-12-21 15:00:55.000000000 +0100 -+++ gnupg-2.0.14/g10/gpg.c 2010-03-22 15:05:00.000000000 +0100 -@@ -340,6 +340,7 @@ enum cmd_and_opt_values +--- gnupg-2.0.13.orig/g10/gpg.c 2009-08-05 12:09:24.000000000 +0200 ++++ gnupg-2.0.13/g10/gpg.c 2010-01-27 17:13:20.000000000 +0100 +@@ -338,6 +338,7 @@ enum cmd_and_opt_values oTTYtype, oLCctype, oLCmessages, @@ -16,7 +16,7 @@ Index: gnupg-2.0.14/g10/gpg.c oXauthority, oGroup, oUnGroup, -@@ -705,6 +706,7 @@ static ARGPARSE_OPTS opts[] = { +@@ -700,6 +701,7 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_s (oPersonalDigestPreferences, "personal-digest-preferences","@"), ARGPARSE_s_s (oPersonalCompressPreferences, "personal-compress-preferences", "@"), @@ -24,26 +24,18 @@ Index: gnupg-2.0.14/g10/gpg.c /* Aliases. I constantly mistype these, and assume other people do as well. */ -@@ -1998,6 +2000,7 @@ main (int argc, char **argv) - opt.def_cert_expire="0"; - set_homedir ( default_homedir () ); - opt.passwd_repeat=1; -+ opt.files_are_digests=0; +@@ -2850,6 +2852,7 @@ main (int argc, char **argv) - /* Check whether we have a config file on the command line. */ - orig_argc = argc; -@@ -2481,6 +2484,7 @@ main (int argc, char **argv) - case oPhotoViewer: opt.photo_viewer = pargs.r.ret_str; break; - case oForceV3Sigs: opt.force_v3_sigs = 1; break; - case oNoForceV3Sigs: opt.force_v3_sigs = 0; break; -+ case oFilesAreDigests: opt.files_are_digests = 1; break; - case oForceV4Certs: opt.force_v4_certs = 1; break; - case oNoForceV4Certs: opt.force_v4_certs = 0; break; - case oForceMDC: opt.force_mdc = 1; break; -Index: gnupg-2.0.14/g10/options.h + case oLCctype: opt.lc_ctype = pargs.r.ret_str; break; + case oLCmessages: opt.lc_messages = pargs.r.ret_str; break; ++ case oFilesAreDigests: opt.files_are_digests = pargs.r.ret_str; break; + + case oGroup: add_group(pargs.r.ret_str); break; + case oUnGroup: rm_group(pargs.r.ret_str); break; +Index: gnupg-2.0.13/g10/options.h =================================================================== ---- gnupg-2.0.14.orig/g10/options.h 2009-09-21 18:53:51.000000000 +0200 -+++ gnupg-2.0.14/g10/options.h 2010-03-22 11:34:09.000000000 +0100 +--- gnupg-2.0.13.orig/g10/options.h 2009-07-07 09:40:19.000000000 +0200 ++++ gnupg-2.0.13/g10/options.h 2010-01-27 16:42:03.000000000 +0100 @@ -194,6 +194,7 @@ struct int no_auto_check_trustdb; int preserve_permissions; @@ -52,10 +44,10 @@ Index: gnupg-2.0.14/g10/options.h struct groupitem *grouplist; int mangle_dos_filenames; int enable_progress_filter; -Index: gnupg-2.0.14/g10/sign.c +Index: gnupg-2.0.13/g10/sign.c =================================================================== ---- gnupg-2.0.14.orig/g10/sign.c 2009-09-21 18:53:51.000000000 +0200 -+++ gnupg-2.0.14/g10/sign.c 2010-03-22 16:07:47.000000000 +0100 +--- gnupg-2.0.13.orig/g10/sign.c 2009-05-11 10:14:54.000000000 +0200 ++++ gnupg-2.0.13/g10/sign.c 2010-01-27 16:59:09.000000000 +0100 @@ -662,8 +662,12 @@ write_signature_packets (SK_LIST sk_list mk_notation_policy_etc (sig, NULL, sk); } @@ -136,7 +128,7 @@ Index: gnupg-2.0.14/g10/sign.c + gcry_md_final(mfx.md); + /* this assumes gcry_md_read returns the same buffer */ + mdb = gcry_md_read(mfx.md, opt.def_digest_algo); -+ mdlen = gcry_md_get_algo_dlen(opt.def_digest_algo); ++ (void) gcry_md_algo_info (opt.def_digest_algo, GCRYCTL_GET_ASNOID, NULL, &mdlen); + if (strlen(fname) != mdlen * 2 + 11) + log_bug("digests must be %d + @ + 5 bytes\n", mdlen); + d = -1; diff --git a/gpg2.changes b/gpg2.changes index 5fbf741..6b4228e 100644 --- a/gpg2.changes +++ b/gpg2.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Mar 22 15:09:24 UTC 2010 - puzel@novell.com - -- fix files-are-digests patch (bnc#469229) - ------------------------------------------------------------------- Wed Feb 17 13:29:18 CET 2010 - dimstar@opensuse.org