aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/getkey.c')
-rw-r--r--g10/getkey.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 13cd81102..2b8a510ac 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1827,9 +1827,10 @@ finish_lookup (GETKEY_CTX ctx)
#define USAGE_MASK (PUBKEY_USAGE_SIG|PUBKEY_USAGE_ENC)
unsigned int req_usage = ( ctx->req_usage & USAGE_MASK );
/* Request the primary if we're certifying another key, and also
- if --pgp6 is on (since pgp 6 (and 7) do not understand
- signatures made by a signing subkey. */
- int req_prim = (ctx->req_usage & PUBKEY_USAGE_CERT) | opt.pgp6;
+ if signing data while --pgp6 is on (since pgp 6 (and 7) do not
+ understand signatures made by a signing subkey. */
+ int req_prim = (ctx->req_usage & PUBKEY_USAGE_CERT) ||
+ (opt.pgp6 && (ctx->req_usage & PUBKEY_USAGE_SIG));
u32 latest_date;
KBNODE latest_key;
u32 curtime = make_timestamp ();