aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-02-28 04:34:01 +0000
committerDavid Shaw <[email protected]>2002-02-28 04:34:01 +0000
commit20dda47d6cb0aaef906dc026aed1393d41182bde (patch)
tree0286de63e07d3a9e6f413891a66f3b3e56d72284
parentIf a key isn't valid (say, because of no self-signature), allow (diff)
downloadgnupg-20dda47d6cb0aaef906dc026aed1393d41182bde.tar.gz
gnupg-20dda47d6cb0aaef906dc026aed1393d41182bde.zip
Do not include v3 keys in a --export-secret-subkeys export.
-rw-r--r--g10/ChangeLog3
-rw-r--r--g10/export.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 27bbb24a2..4dbd64c12 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,5 +1,8 @@
2002-02-27 David Shaw <[email protected]>
+ * 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.
diff --git a/g10/export.c b/g10/export.c
index c7cd46351..2bfb9d018 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -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