mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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
|
@ -377,7 +377,8 @@ gpg_error_t get_best_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
|||
|
||||
/* Get a public key directly from file FNAME. */
|
||||
gpg_error_t get_pubkey_fromfile (ctrl_t ctrl,
|
||||
PKT_public_key *pk, const char *fname);
|
||||
PKT_public_key *pk, const char *fname,
|
||||
kbnode_t *r_keyblock);
|
||||
|
||||
/* Get a public key from a buffer. */
|
||||
gpg_error_t get_pubkey_from_buffer (ctrl_t ctrl, PKT_public_key *pkbuf,
|
||||
|
@ -453,6 +454,9 @@ void setup_main_keyids (kbnode_t keyblock);
|
|||
data structures. */
|
||||
void merge_keys_and_selfsig (ctrl_t ctrl, kbnode_t keyblock);
|
||||
|
||||
/* This function parses the key flags and returns PUBKEY_USAGE_ flags. */
|
||||
unsigned int parse_key_usage (PKT_signature *sig);
|
||||
|
||||
char *get_user_id_string_native (ctrl_t ctrl, u32 *keyid);
|
||||
char *get_long_user_id_string (ctrl_t ctrl, u32 *keyid);
|
||||
char *get_user_id (ctrl_t ctrl, u32 *keyid, size_t *rn, int *r_nouid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue