mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 08:48:17 +00:00
Merge remote-tracking branch 'origin/pr/2346' into mbedtls-2.16
This commit is contained in:
commit
6f76795bf5
2 changed files with 8 additions and 2 deletions
|
@ -23,6 +23,7 @@ Bugfix
|
|||
* Remove a duplicate #include in a sample program. Fixed by Masashi Honma #2326.
|
||||
* Remove the mbedtls namespacing from the header file, to fix a "file not found"
|
||||
build error. Fixed by Haijun Gu #2319.
|
||||
* Fix returning the value 1 when mbedtls_ecdsa_genkey failed.
|
||||
|
||||
Changes
|
||||
* Include configuration file in all header files that use configuration,
|
||||
|
|
|
@ -800,11 +800,16 @@ cleanup:
|
|||
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 ret = 0;
|
||||
ECDSA_VALIDATE_RET( ctx != NULL );
|
||||
ECDSA_VALIDATE_RET( f_rng != NULL );
|
||||
|
||||
return( mbedtls_ecp_group_load( &ctx->grp, gid ) ||
|
||||
mbedtls_ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) );
|
||||
ret = mbedtls_ecp_group_load( &ctx->grp, gid );
|
||||
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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue