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
|
@ -335,7 +335,8 @@ check_signature_metadata_validity (PKT_public_key *pk, PKT_signature *sig,
|
|||
if (r_revoked)
|
||||
*r_revoked = 0;
|
||||
|
||||
if (pk->timestamp > sig->timestamp )
|
||||
if (pk->timestamp > sig->timestamp
|
||||
&& !(parse_key_usage (sig) & PUBKEY_USAGE_RENC))
|
||||
{
|
||||
ulong d = pk->timestamp - sig->timestamp;
|
||||
if ( d < 86400 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue