1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-02 02:48:57 +02:00

Do not include v3 keys in a --export-secret-subkeys export.

This commit is contained in:
David Shaw 2002-02-28 04:34:01 +00:00
parent 8ed6d59a6c
commit 20dda47d6c
2 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2002-02-27 David Shaw <dshaw@jabberwocky.com>
* export.c (do_export_stream): Do not include v3 keys in a
--export-secret-subkeys export.
* getkey.c (merge_selfsigs_main): If a key isn't valid (say,
because of no self-signature), allow --always-trust to force it
valid so it can be trusted.

View File

@ -183,6 +183,14 @@ do_export_stream( IOBUF out, STRLIST users, int secret, int onlyrfc, int *any )
continue;
}
/* no v3 keys with GNU mode 1001 */
if( secret == 2 && node->pkt->pkt.secret_key->version == 3 )
{
log_info(_("key %08lX: PGP 2.x style key - skipped\n"),
(ulong)keyid_from_sk( node->pkt->pkt.secret_key, NULL) );
continue;
}
/* and write it */
for( kbctx=NULL; (node = walk_kbnode( keyblock, &kbctx, 0 )); ) {
/* don't export any comment packets but those in the