- fix: signed pubkeys were imported incorrectly (#68291).
authorjbj <devnull@localhost>
Fri, 2 Aug 2002 16:39:55 +0000 (16:39 +0000)
committerjbj <devnull@localhost>
Fri, 2 Aug 2002 16:39:55 +0000 (16:39 +0000)
- include tgpg script to verify signatures using only gpg.

CVS patchset: 5593
CVS date: 2002/08/02 16:39:55

36 files changed:
CHANGES
lib/rpmchecksig.c
po/cs.po
po/da.po
po/de.po
po/en_RN.po
po/es.po
po/eu_ES.po
po/fi.po
po/fr.po
po/gl.po
po/hu.po
po/id.po
po/is.po
po/it.po
po/ja.po
po/ko.po
po/no.po
po/pl.po
po/pt.po
po/pt_BR.po
po/ro.po
po/rpm.pot
po/ru.po
po/sk.po
po/sl.po
po/sr.po
po/sv.po
po/tr.po
po/uk.po
po/wa.po
po/zh.po
po/zh_CN.GB2312.po
rpm.spec.in
rpmio/rpmpgp.c
rpmio/rpmpgp.h

diff --git a/CHANGES b/CHANGES
index 495928b..79f3f9e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
        - preserve rpmdb file attributes across --rebuilddb (#70367).
        - fix: identify athlon with 3DNOWEXT as "athlon", not "i786" (#70539).
        - fix: repair --root with --verify (#70527).
+       - fix: signed pubkeys were imported incorrectly (#68291).
+       - include tgpg script to verify signatures using only gpg.
 
 4.0.3 -> 4.0.4:
        - solaris: translate i86pc to i386 (#57182).
index 833d102..db04702 100644 (file)
@@ -840,9 +840,11 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                              if (res3 == RPMSIG_NOKEY) {
                                m = stpcpy(m, " PGP#");
                                m = stpncpy(m, tempKey + offset, 8);
+                               *m = '\0';
                              } else {
                                u = stpcpy(u, " PGP#");
                                u = stpncpy(u, tempKey + offset, 8);
+                               *u = '\0';
                              }
                            }
                        }   /*@innerbreak@*/ break;
@@ -863,8 +865,10 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                            b = stpcpy(b, "(GPG) ");
                            m = stpcpy(m, " GPG#");
                            tempKey = strstr(result, "ey ID");
-                           if (tempKey)
+                           if (tempKey) {
                                m = stpncpy(m, tempKey+6, 8);
+                               *m = '\0';
+                           }
                            res2 = 1;
                            /*@innerbreak@*/ break;
                        default:
index e73febc..f03e65e 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2001-07-24 10:02+0100\n"
 "Last-Translator: Milan Kerslager <kerslage@linux.cz>\n"
 "Language-Team: Czech <cs@li.org>\n"
index 1d91e8f..f01bb3b 100644 (file)
--- a/po/da.po
+++ b/po/da.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2001-04-05 23:03GMT\n"
 "Last-Translator: Claus Hindsgaul <claus_h@image.dk>\n"
 "Language-Team: Danish <dansk@klid.dk>\n"
index d89596d..37e7315 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -37,7 +37,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 1998-08-03 18:02+02:00\n"
 "Last-Translator: Karl Eichwalder <ke@SuSE.DE>\n"
 "Language-Team: German <de@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 8a29240..5779827 100644 (file)
--- a/po/fi.po
+++ b/po/fi.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "Last-Translator: Raimo Koski <rkoski@pp.weppi.fi>\n"
 "Language-Team: Finnish <linux@sot.com>\n"
 "Content-Type: text/plain; charset=\n"
index c81e5b1..c22d59c 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index a52c95c..c5d8c2d 100644 (file)
--- a/po/gl.po
+++ b/po/gl.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.1\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2001-01-13 22:31+0100\n"
 "Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
 "Language-Team: Galician <trasno@ceu.fi.udc.es>\n"
index dbf9ed0..be046f0 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
--- a/po/id.po
+++ b/po/id.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 5a38071..b8fb25c 100644 (file)
--- a/po/is.po
+++ b/po/is.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2001-07-12 13:25+0000\n"
 "Last-Translator: Richard Allen <ra@hp.is>\n"
 "Language-Team: is <kde-isl@mmedia.is>\n"
index dbf9ed0..be046f0 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 91d34a5..99ddff1 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 1999-12-01 22:49 +JST\n"
 "Last-Translator: Kanda Mitsuru <kanda@nn.iij4u.or.jp>\n"
 "Language-Team: JRPM <jrpm@linux.or.jp>\n"
index bf2fd9d..d4813cb 100644 (file)
--- a/po/ko.po
+++ b/po/ko.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.4\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2002-03-04 17:17+0900\n"
 "Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
 "Language-Team: GNU Translation project <ko@li.org>\n"
index 28d6ac9..b3d8094 100644 (file)
--- a/po/no.po
+++ b/po/no.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2001-06-27 12:24+0200\n"
 "Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
 "Language-Team: Norwegian <no@li.org>\n"
index 94dc466..02094a5 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 1999-05-25 17:00+0100\n"
 "Last-Translator: Pawe³ Dziekoñski <pdziekonski@mml.ch.pwr.wroc.pl>\n"
 "Language-Team: Polish <pl@li.org>\n"
index 360b8fd..d8e51cb 100644 (file)
--- a/po/pt.po
+++ b/po/pt.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2002-02-14 10:51+0000\n"
 "Last-Translator: José Nuno Coelho Sanarra Pires <jncp@rnl.ist.utl.pt>\n"
 "Language-Team: pt <morais@kde.org\n"
index 4710ce7..f79f25e 100644 (file)
@@ -4,7 +4,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 
 #: build.c:40
 #, fuzzy
index 3e0c0e9..aec1138 100644 (file)
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 1999-04-10 12:00+EST\n"
 "Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
 "Language-Team: Romanian <ro@li.org>\n"
index cb6fd71..897ad0d 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index d7fd59d..9e9d76d 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2002-04-09 16:44-0400\n"
 "Last-Translator: Eugene Kanter, <eugene@bcl.bz>\n"
 "Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n"
index 265e69d..28fea6b 100644 (file)
--- a/po/sk.po
+++ b/po/sk.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 1999-04-08 21:37+02:00\n"
 "Last-Translator: Stanislav Meduna <stano@eunet.sk>\n"
 "Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"
index e482f25..68de6c3 100644 (file)
--- a/po/sl.po
+++ b/po/sl.po
@@ -1,12 +1,12 @@
 # -*- mode:po; coding:iso-latin-2; -*- Slovenian messages for Redhat pkg. mngr.
 # Copyright (C) 2000 Free Software Foundation, Inc.
 # Primo¾ Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>, 2000.
-# $Id: sl.po,v 1.297 2002/08/02 14:11:10 jbj Exp $
+# $Id: sl.po,v 1.298 2002/08/02 16:40:42 jbj Exp $
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2000-10-08 19:05+0200\n"
 "Last-Translator: Grega Fajdiga <gregor.fajdiga@telemach.net>\n"
 "Language-Team: Slovenian <sl@li.org>\n"
index fd00b77..5dd308b 100644 (file)
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "Content-Type: text/plain; charset=\n"
 "Date: 1998-05-02 21:41:47-0400\n"
 
index c7e333e..e9f765e 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.1\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2002-07-11 22:49+0200\n"
 "Last-Translator: Göran Uddeborg <goeran@uddeborg.pp.se>\n"
 "Language-Team: Swedish <sv@li.org>\n"
index 4983bcf..fbda13c 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: 2001-07-05 08:02+300\n"
 "Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n"
 "Language-Team: Turkish <tr@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
--- a/po/uk.po
+++ b/po/uk.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
--- a/po/wa.po
+++ b/po/wa.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
--- a/po/zh.po
+++ b/po/zh.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index dbf9ed0..be046f0 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-08-02 10:09-0400\n"
+"POT-Creation-Date: 2002-08-02 11:52-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 5d61364..ce060ec 100644 (file)
@@ -17,7 +17,7 @@ Name: rpm
 %define version @VERSION@
 Version: %{version}
 %{expand: %%define rpm_version %{version}}
-Release: 0.65
+Release: 0.66
 Group: System Environment/Base
 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
 Copyright: GPL
@@ -336,6 +336,7 @@ fi
 %rpmattr       %{__prefix}/lib/rpm/rpm.*
 %rpmattr       %{__prefix}/lib/rpm/rpm2cpio.sh
 %rpmattr       %{__prefix}/lib/rpm/rpm[deiukqv]
+%rpmattr       %{__prefix}/lib/rpm/tgpg
 %attr(0644, @RPMUSER@, @RPMGROUP@)     %{__prefix}/lib/rpm/rpmpopt*
 %attr(0644, @RPMUSER@, @RPMGROUP@)     %{__prefix}/lib/rpm/rpmrc
 
@@ -516,9 +517,11 @@ fi
 %{__prefix}/include/popt.h
 
 %changelog
-* Fri Aug  2 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.65
+* Fri Aug  2 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.66
 - fix: identify athlon with 3DNOWEXT as "athlon", not "i786" (#70539).
 - fix: repair --root with --verify (#70527).
+- fix: signed pubkeys were imported incorrectly (#68291).
+- include tgpg script to verify signatures using only gpg.
 
 * Thu Aug  1 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.63
 - add check-files to rpm-build manifest.
index 31ab41d..5b7108d 100644 (file)
@@ -346,7 +346,7 @@ fprintf(stderr, "\t %s ", pre), mp32println(stderr, mpn->size, mpn->data);
 }
 /*@=boundswrite@*/
 
-int pgpPrtSubType(const byte *h, unsigned int hlen)
+int pgpPrtSubType(const byte *h, unsigned int hlen, pgpSigType sigtype)
 {
     const byte *p = h;
     unsigned plen;
@@ -377,11 +377,8 @@ int pgpPrtSubType(const byte *h, unsigned int hlen)
            /*@switchbreak@*/ break;
        case PGPSUBTYPE_SIG_CREATE_TIME:
 /*@-mods -mayaliasunique @*/
-#ifdef DYING
-           if (_digp && _digp->tag == PGPTAG_PUBLIC_KEY)
-#else
-           if (_digp && !(_digp->saved & PGPDIG_SAVED_TIME))
-#endif
+           if (sigtype == PGPSIGTYPE_POSITIVE_CERT &&
+               _digp && !(_digp->saved & PGPDIG_SAVED_TIME))
            {
                _digp->saved |= PGPDIG_SAVED_TIME;
                memcpy(_digp->time, p+1, sizeof(_digp->time));
@@ -400,11 +397,8 @@ int pgpPrtSubType(const byte *h, unsigned int hlen)
 
        case PGPSUBTYPE_ISSUER_KEYID:   /* issuer key ID */
 /*@-mods -mayaliasunique @*/
-#ifdef DYING
-           if (_digp && _digp->tag == PGPTAG_PUBLIC_KEY)
-#else
-           if (_digp && !(_digp->saved & PGPDIG_SAVED_ID))
-#endif
+           if (sigtype == PGPSIGTYPE_POSITIVE_CERT &&
+               _digp && !(_digp->saved & PGPDIG_SAVED_ID))
            {
                _digp->saved |= PGPDIG_SAVED_ID;
                memcpy(_digp->signid, p+1, sizeof(_digp->signid));
@@ -586,7 +580,7 @@ fprintf(stderr, "   hash[%u] -- %s\n", plen, pgpHexStr(p, plen));
            _digp->hash = memcpy(xmalloc(_digp->hashlen), v, _digp->hashlen);
        }
 /*@=mods@*/
-       (void) pgpPrtSubType(p, plen);
+       (void) pgpPrtSubType(p, plen, v->sigtype);
        p += plen;
 
        plen = pgpGrab(p,2);
@@ -594,7 +588,7 @@ fprintf(stderr, "   hash[%u] -- %s\n", plen, pgpHexStr(p, plen));
 
 if (_debug && _print)
 fprintf(stderr, " unhash[%u] -- %s\n", plen, pgpHexStr(p, plen));
-       (void) pgpPrtSubType(p, plen);
+       (void) pgpPrtSubType(p, plen, v->sigtype);
        p += plen;
 
        plen = pgpGrab(p,2);
index 962a1ce..05d238c 100644 (file)
@@ -1144,9 +1144,10 @@ void pgpPrtVal(const char * pre, pgpValTbl vs, byte val)
  * Print/parse an OpenPGP subtype packet.
  * @param h            packet
  * @param hlen         packet length (no. of bytes)
+ * @param sigtype      signature type
  * @return             0 on success
  */
-int pgpPrtSubType(const byte *h, unsigned int hlen)
+int pgpPrtSubType(const byte *h, unsigned int hlen, pgpSigType sigtype)
        /*@globals fileSystem @*/
        /*@modifies fileSystem @*/;