aboutsummaryrefslogtreecommitdiffstats
path: root/g10/packet.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-10-31 14:11:55 +0000
committerWerner Koch <[email protected]>2024-10-31 14:11:55 +0000
commitd30e345692440b9c6677118c1d20b9d17d80f873 (patch)
treed2b7f924c0f5d733245a46173ba8f575531f10de /g10/packet.h
parentagent: Fix status output for LISTTRUSTED. (diff)
downloadgnupg-d30e345692440b9c6677118c1d20b9d17d80f873.tar.gz
gnupg-d30e345692440b9c6677118c1d20b9d17d80f873.zip
gpg: Allow the use of an ADSK subkey as ADSK subkey.
* g10/packet.h (PKT_public_key): Increased size of req_usage to 16. * g10/getkey.c (key_byname): Set allow_adsk in the context if ir was requested via req_usage. (finish_lookup): Allow RENC usage matching. * g10/keyedit.c (append_adsk_to_key): Adjust the assert. * g10/keygen.c (prepare_adsk): Also allow to find an RENC subkey. -- If an ADSK is to be added it may happen that an ADSK subkey is found first and this should then be used even that it does not have the E usage. However, it used to have that E usage when it was added. While testing this I found another pecularity: If you do gpg -k ADSK_SUBKEY_FPR without the '!' suffix and no corresponding encryption subkey is dound, you will get an unusabe key error. I hesitate to fix that due to possible side-effects. GnuPG-bug-id: 6882
Diffstat (limited to '')
-rw-r--r--g10/packet.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/g10/packet.h b/g10/packet.h
index 5cef17543..375392807 100644
--- a/g10/packet.h
+++ b/g10/packet.h
@@ -400,11 +400,10 @@ typedef struct
when serializing. (Serialized.) */
byte version;
byte selfsigversion; /* highest version of all of the self-sigs */
- /* The public key algorithm. (Serialized.) */
- byte pubkey_algo;
- u16 pubkey_usage; /* carries the usage info. */
- byte req_usage; /* hack to pass a request to getkey() */
byte fprlen; /* 0 or length of FPR. */
+ byte pubkey_algo; /* The public key algorithm. (PGP format) */
+ u16 pubkey_usage; /* carries the usage info. */
+ u16 req_usage; /* hack to pass a request to getkey() */
u32 has_expired; /* set to the expiration date if expired */
/* keyid of the primary key. Never access this value directly.
Instead, use pk_main_keyid(). */