summaryrefslogtreecommitdiffstats
path: root/g10/packet.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2022-09-07 10:34:05 +0200
committerWerner Koch <wk@gnupg.org>2022-09-07 11:54:23 +0200
commit0988e49c45d0fb73d0b536aa027bd114f9dc65a7 (patch)
treef9ba57bdd4cc4aa1aa647508ecbd9739a905ebae /g10/packet.h
parenttools:gpg-auth: Support use of pinpad. (diff)
downloadgnupg2-0988e49c45d0fb73d0b536aa027bd114f9dc65a7.tar.xz
gnupg2-0988e49c45d0fb73d0b536aa027bd114f9dc65a7.zip
gpg: Support key flags for RENC, TIME, and GROUP.
* g10/packet.h (PUBKEY_USAGE_RENC): New. (PUBKEY_USAGE_TIME): New. (PUBKEY_USAGE_GROUP): New. * g10/getkey.c (parse_key_usage): Set the new key flags. * g10/keyedit.c (show_key_with_all_names_colon): Show the new key flags. * g10/keyid.c (usagestr_from_pk): Ditto * g10/keylist.c (print_capabilities): Ditto. * g10/keygen.c (parse_usagestr): Parse line and set new flags. (quickgen_set_para): Show flags. -- See draft-koch-openpgp-2015-rfc4880bis-00 for the current version. Actually these flags have been in the draft for years now. This patch is a first step to make use of them.
Diffstat (limited to 'g10/packet.h')
-rw-r--r--g10/packet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/packet.h b/g10/packet.h
index 5a14015a1..eeea9b450 100644
--- a/g10/packet.h
+++ b/g10/packet.h
@@ -56,6 +56,9 @@
| GCRY_PK_USAGE_AUTH | GCRY_PK_USAGE_UNKN) >= 256
# error Please choose another value for PUBKEY_USAGE_NONE
#endif
+#define PUBKEY_USAGE_RENC 512 /* Restricted encryption. */
+#define PUBKEY_USAGE_TIME 1024 /* Timestamp use. */
+#define PUBKEY_USAGE_GROUP 512 /* Group flag. */
/* Helper macros. */
#define is_RSA(a) ((a)==PUBKEY_ALGO_RSA || (a)==PUBKEY_ALGO_RSA_E \