botan: Reject EC keys with explicitly encoded parameters

This requires a function that will be added in the upcoming Botan 3.2
release.
This commit is contained in:
Tobias Brunner
2023-10-13 09:10:46 +02:00
parent 2bccdefc2c
commit 0b989c7b20
2 changed files with 9 additions and 1 deletions
@@ -235,6 +235,14 @@ botan_ec_public_key_t *botan_ec_public_key_adopt(botan_pubkey_t key)
{
private_botan_ec_public_key_t *this;
#ifdef HAVE_BOTAN_PUBKEY_ECC_KEY_USED_EXPLICIT_ENCODING
if (botan_pubkey_ecc_key_used_explicit_encoding(key))
{
botan_pubkey_destroy(key);
return NULL;
}
#endif
INIT(this,
.public = {
.key = {