mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-23 11:42:31 +00:00
Merge remote-tracking branch 'public/pr/2345' into development
This commit is contained in:
commit
d4e327c4ff
@ -11,6 +11,7 @@ Bugfix
|
|||||||
previously lead to a stack overflow on constrained targets.
|
previously lead to a stack overflow on constrained targets.
|
||||||
* Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions
|
* Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions
|
||||||
in the header files, which missed the precompilation check. #971
|
in the header files, which missed the precompilation check. #971
|
||||||
|
* Fix returning the value 1 when mbedtls_ecdsa_genkey failed.
|
||||||
|
|
||||||
= mbed TLS 2.16.0 branch released 2018-12-21
|
= mbed TLS 2.16.0 branch released 2018-12-21
|
||||||
|
|
||||||
|
@ -800,11 +800,16 @@ cleanup:
|
|||||||
int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid,
|
int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid,
|
||||||
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
|
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
|
||||||
{
|
{
|
||||||
|
int ret = 0;
|
||||||
ECDSA_VALIDATE_RET( ctx != NULL );
|
ECDSA_VALIDATE_RET( ctx != NULL );
|
||||||
ECDSA_VALIDATE_RET( f_rng != NULL );
|
ECDSA_VALIDATE_RET( f_rng != NULL );
|
||||||
|
|
||||||
return( mbedtls_ecp_group_load( &ctx->grp, gid ) ||
|
ret = mbedtls_ecp_group_load( &ctx->grp, gid );
|
||||||
mbedtls_ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) );
|
if( ret != 0 )
|
||||||
|
return( ret );
|
||||||
|
|
||||||
|
return( mbedtls_ecp_gen_keypair( &ctx->grp, &ctx->d,
|
||||||
|
&ctx->Q, f_rng, p_rng ) );
|
||||||
}
|
}
|
||||||
#endif /* !MBEDTLS_ECDSA_GENKEY_ALT */
|
#endif /* !MBEDTLS_ECDSA_GENKEY_ALT */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user