mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Implement encryption to ADSKs.
* g10/getkey.c (get_pubkey_fromfile): Add optional arg r_keyblock. * g10/pkclist.c (find_and_check_key): Also encrypt to RENC subkeys. * g10/getkey.c (parse_key_usage): Make public. * g10/misc.c (openpgp_pk_algo_usage): Take PUBKEY_USAGE_RENC in account. * g10/packet.h (PKT_public_key): Change pubkey_usage from byte to u16. (PKT_user_id): Cosmetic fix: change help_key_usage from int to u16. * g10/sig-check.c (check_signature_metadata_validity): Handle time conflict for ADSKs. -- GnuPG-bug-id: 6395 This patch handles ADSK keys and encrypts to them. It does not yet allow the creation of them. We backport this from master early to get this part of the code out into the field.
This commit is contained in:
parent
fde59f9ae6
commit
e4f61df850
6 changed files with 54 additions and 24 deletions
|
@ -290,7 +290,7 @@ typedef struct
|
|||
/* The length of ATTRIB_DATA. */
|
||||
unsigned long attrib_len;
|
||||
byte *namehash;
|
||||
int help_key_usage;
|
||||
u16 help_key_usage;
|
||||
u32 help_key_expire;
|
||||
int help_full_count;
|
||||
int help_marginal_count;
|
||||
|
@ -388,7 +388,7 @@ typedef struct
|
|||
byte selfsigversion; /* highest version of all of the self-sigs */
|
||||
/* The public key algorithm. (Serialized.) */
|
||||
byte pubkey_algo;
|
||||
byte pubkey_usage; /* for now only used to pass it to getkey() */
|
||||
u16 pubkey_usage; /* carries the usage info. */
|
||||
byte 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue