mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* revoke.c (gen_desig_revoke): Specify in the comment when a designated
revocation is generated. * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey, get_seckey_byname2): Disallow use of sign+encrypt Elgamal keys for anything except revocations. * sign.c (do_sign): Catchall for any Elgamal signatures except revocations.
This commit is contained in:
parent
dfd8b9d8d3
commit
74e3c5ac7d
4 changed files with 35 additions and 3 deletions
|
@ -266,6 +266,12 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
|
|||
return G10ERR_TIME_CONFLICT;
|
||||
}
|
||||
|
||||
/* For safety, only allow revocation sigs from Elgamal
|
||||
sign+encrypt keys. Note that this allows for Elgamal
|
||||
designated revocations as well, but that's arguably a good
|
||||
thing. */
|
||||
if(sk->pubkey_algo==PUBKEY_ALGO_ELGAMAL && sig->sig_class!=0x20)
|
||||
return G10ERR_UNU_SECKEY;
|
||||
|
||||
print_pubkey_algo_note(sk->pubkey_algo);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue