mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/eap_hash_key_len_validation' into 'master'
esp_wifi:adding hash key length validation Closes WIFI-4882 and WIFI-4825 See merge request espressif/esp-idf!20438
This commit is contained in:
commit
7a7bdf05d5
@ -339,8 +339,11 @@ int crypto_public_key_decrypt_pkcs1(struct crypto_public_key *key,
|
|||||||
size_t len;
|
size_t len;
|
||||||
u8 *pos;
|
u8 *pos;
|
||||||
mbedtls_pk_context *pkey = (mbedtls_pk_context *)key;
|
mbedtls_pk_context *pkey = (mbedtls_pk_context *)key;
|
||||||
|
len = mbedtls_pk_rsa(*pkey)->MBEDTLS_PRIVATE(len);
|
||||||
|
if (len != crypt_len) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
len = *plain_len;
|
|
||||||
if (mbedtls_rsa_public(mbedtls_pk_rsa(*pkey), crypt, plain) < 0)
|
if (mbedtls_rsa_public(mbedtls_pk_rsa(*pkey), crypt, plain) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user