mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-13 22:21:09 +02:00
g10: detects public key encryption packet error properly.
g10/mainproc.c (proc_pubkey_enc): Only allow relevant algorithms for encryption.
This commit is contained in:
parent
5038276fc4
commit
c771963140
@ -406,12 +406,10 @@ proc_pubkey_enc (CTX c, PACKET *pkt)
|
|||||||
c->dek = NULL;
|
c->dek = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (is_ELGAMAL(enc->pubkey_algo)
|
else if (enc->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E
|
||||||
|| enc->pubkey_algo == PUBKEY_ALGO_DSA
|
|
||||||
|| enc->pubkey_algo == PUBKEY_ALGO_ECDSA
|
|
||||||
|| enc->pubkey_algo == PUBKEY_ALGO_EDDSA
|
|
||||||
|| enc->pubkey_algo == PUBKEY_ALGO_ECDH
|
|| enc->pubkey_algo == PUBKEY_ALGO_ECDH
|
||||||
|| is_RSA (enc->pubkey_algo)
|
|| enc->pubkey_algo == PUBKEY_ALGO_RSA
|
||||||
|
|| enc->pubkey_algo == PUBKEY_ALGO_RSA_E
|
||||||
|| enc->pubkey_algo == PUBKEY_ALGO_ELGAMAL)
|
|| enc->pubkey_algo == PUBKEY_ALGO_ELGAMAL)
|
||||||
{
|
{
|
||||||
/* Note that we also allow type 20 Elgamal keys for decryption.
|
/* Note that we also allow type 20 Elgamal keys for decryption.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user