mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Merge pull request #7864 from waleed-elmelegy-arm/enforce-min-RSA-key-size
Enforce minimum key size when generating RSA key size
This commit is contained in:
@ -7364,6 +7364,9 @@ static psa_status_t psa_validate_key_type_and_size_for_key_generation(
|
||||
if (bits > PSA_VENDOR_RSA_MAX_KEY_BITS) {
|
||||
return PSA_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
if (bits < PSA_VENDOR_RSA_GENERATE_MIN_KEY_BITS) {
|
||||
return PSA_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* Accept only byte-aligned keys, for the same reasons as
|
||||
* in psa_import_rsa_key(). */
|
||||
|
Reference in New Issue
Block a user