From 983923c914a9ee23a820d8d86bdec29055e8b3d1 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Thu, 3 Aug 2023 15:33:24 +0200 Subject: [PATCH] p256m: minor fixes to the driver interface Signed-off-by: Valerio Setti --- 3rdparty/p256-m/p256-m_driver_entrypoints.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3rdparty/p256-m/p256-m_driver_entrypoints.c b/3rdparty/p256-m/p256-m_driver_entrypoints.c index 882890918..90dce1e18 100644 --- a/3rdparty/p256-m/p256-m_driver_entrypoints.c +++ b/3rdparty/p256-m/p256-m_driver_entrypoints.c @@ -114,7 +114,7 @@ psa_status_t p256_transparent_key_agreement( /* * Check that private key = 32 bytes, peer public key = 65 bytes, * and that the shared secret buffer is big enough. */ - psa_status_t status = PSA_ERROR_NOT_SUPPORTED; + psa_status_t status = PSA_ERROR_INVALID_ARGUMENT; if (key_buffer_size != 32 || shared_secret_size < 32 || peer_key_length != 65) { return status; @@ -150,7 +150,7 @@ psa_status_t p256_transparent_sign_hash( (void) alg; psa_status_t status = PSA_ERROR_NOT_SUPPORTED; - if (key_buffer_size != 32 || signature_size != 64) { + if (key_buffer_size != 32 || signature_size < 64) { return status; }