1
0
Fork 0
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:
David Shaw 2003-11-29 22:44:05 +00:00
parent dfd8b9d8d3
commit 74e3c5ac7d
4 changed files with 35 additions and 3 deletions

View file

@ -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);