gnupg/g10 (ChangeLog export.c)
cvs user dshaw
cvs at cvs.gnupg.org
Fri Nov 26 17:41:06 CET 2004
Date: Friday, November 26, 2004 @ 17:48:05
Author: dshaw
Path: /cvs/gnupg/gnupg/g10
Modified: ChangeLog export.c
* export.c (do_export_stream): Allow export-minimal to work with secret
keys, even though a non-selfsig secret key signature is rare.
-----------+
ChangeLog | 4 ++++
export.c | 11 +++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.644 gnupg/g10/ChangeLog:1.645
--- gnupg/g10/ChangeLog:1.644 Fri Nov 26 16:51:37 2004
+++ gnupg/g10/ChangeLog Fri Nov 26 17:48:05 2004
@@ -1,5 +1,9 @@
2004-11-26 David Shaw <dshaw at jabberwocky.com>
+ * export.c (do_export_stream): Allow export-minimal to work with
+ secret keys, even though a non-selfsig secret key signature is
+ rare.
+
* options.h, export.c (parse_export_options, do_export_stream),
import.c (parse_import_options, import_keys_internal): Make the
import-options and export-options distinct since they can be mixed
Index: gnupg/g10/export.c
diff -u gnupg/g10/export.c:1.43 gnupg/g10/export.c:1.44
--- gnupg/g10/export.c:1.43 Fri Nov 26 16:51:37 2004
+++ gnupg/g10/export.c Fri Nov 26 17:48:05 2004
@@ -145,7 +145,7 @@
KEYDB_SEARCH_DESC *desc = NULL;
KEYDB_HANDLE kdbhd;
STRLIST sl;
- u32 pk_keyid[2];
+ u32 keyid[2];
*any = 0;
init_packet( &pkt );
@@ -220,10 +220,13 @@
keystr(sk_keyid));
continue;
}
+
+ if(options&EXPORT_MINIMAL)
+ keyid_from_sk(sk,keyid);
}
else if((options&EXPORT_MINIMAL)
&& (node=find_kbnode(keyblock,PKT_PUBLIC_KEY)))
- keyid_from_pk(node->pkt->pkt.public_key,pk_keyid);
+ keyid_from_pk(node->pkt->pkt.public_key,keyid);
/* and write it */
for( kbctx=NULL; (node = walk_kbnode( keyblock, &kbctx, 0 )); ) {
@@ -317,8 +320,8 @@
0x13). A designated revocation is not stripped. */
if((options&EXPORT_MINIMAL)
&& IS_UID_SIG(node->pkt->pkt.signature)
- && (node->pkt->pkt.signature->keyid[0]!=pk_keyid[0]
- || node->pkt->pkt.signature->keyid[1]!=pk_keyid[1]))
+ && (node->pkt->pkt.signature->keyid[0]!=keyid[0]
+ || node->pkt->pkt.signature->keyid[1]!=keyid[1]))
continue;
/* do not export packets which are marked as not exportable */
More information about the Gnupg-commits
mailing list