mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-11-09 14:50:17 +08:00
ECDH: Everest: align error code with ecdh.c
Arguably the value returned by Everest was more precise, but considering we're in an LTS branch, I'd rather not change the value returned by ecdh.c, and align the special case on the general case. The added tests made it apparent that Everest and the generic code were not returning the same value here. Alignment between the two values is desirable to keep the test code simple and sweet. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
fbabe53462
commit
a2ca5fb23a
2
3rdparty/everest/library/x25519.c
vendored
2
3rdparty/everest/library/x25519.c
vendored
@ -129,7 +129,7 @@ int mbedtls_x25519_calc_secret( mbedtls_x25519_context *ctx, size_t *olen,
|
||||
*olen = MBEDTLS_X25519_KEY_SIZE_BYTES;
|
||||
|
||||
if( blen < *olen )
|
||||
return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL );
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
|
||||
/* scalarmult modifies this input, let's make a copy... */
|
||||
unsigned char secret[MBEDTLS_X25519_KEY_SIZE_BYTES];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user