1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

generate key ext: skip driver invocation with non-default method

In the driver wrapper for psa_generate_key() and psa_generate_key_ext():

* Invoke the built-in code if using a non-default method, even if there
  might be an accelerator. This is ok because we only support non-default
  methods for RSA and we don't support driver-only RSA, therefore a
  non-default method will always have built-in code behind it.
* Return NOT_SUPPORTED if trying to use a non-default method with an opaque
  driver.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2024-02-14 23:07:33 +01:00
parent c81393b2ed
commit 69f11c8dfb
3 changed files with 29 additions and 5 deletions

View File

@ -6025,7 +6025,7 @@ exit:
static const psa_key_generation_method_t default_method = PSA_KEY_GENERATION_METHOD_INIT;
static int psa_key_generation_method_is_default(
int psa_key_generation_method_is_default(
const psa_key_generation_method_t *method,
size_t method_data_length)
{