mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-07 22:27:01 -04:00
Missing word
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
9ffffab4d6
commit
fd9e50606c
@ -26,14 +26,14 @@ void import_not_supported(int key_type, data_t *key_material)
|
||||
#if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
|
||||
if (actual_status == PSA_ERROR_INVALID_ARGUMENT) {
|
||||
/* Edge case: when importing an ECC public key with an unspecified
|
||||
* bit-size (as we do here), the infers the bit-size from the input.
|
||||
* If the key type specifies an unknown curve, the validation might
|
||||
* reject the data as invalid before it checks that the curve is
|
||||
* supported. If so, that's ok. In practice, at the time of writing,
|
||||
* this happens with Ed25519, for which a valid but unsupported
|
||||
* 32-byte input causes psa_import_key() to fail because it
|
||||
* assumes a Weierstrass curve which must have an odd-length
|
||||
* encoding.
|
||||
* bit-size (as we do here), the implementation of psa_import_key()
|
||||
* infers the bit-size from the input. If the key type specifies an
|
||||
* unknown curve, the validation might reject the data as invalid
|
||||
* before it checks that the curve is supported. If so, that's ok.
|
||||
* In practice, at the time of writing, this happens with Ed25519,
|
||||
* for which a valid but unsupported 32-byte input causes
|
||||
* psa_import_key() to fail because it assumes a Weierstrass curve
|
||||
* which must have an odd-length encoding.
|
||||
*
|
||||
* In other cases, we do not expect an INVALID_ARGUMENT error here. */
|
||||
TEST_ASSERT(PSA_KEY_TYPE_IS_ECC(key_type));
|
||||
|
Loading…
x
Reference in New Issue
Block a user