mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 21:45:40 +01:00
Add missing return code check on call to mbedtls_md()
This commit is contained in:
parent
39e2c0eeb6
commit
3a3b161e96
@ -226,7 +226,9 @@ int mbedtls_x509write_csr_der( mbedtls_x509write_csr *ctx, unsigned char *buf, s
|
|||||||
/*
|
/*
|
||||||
* Prepare signature
|
* Prepare signature
|
||||||
*/
|
*/
|
||||||
mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash );
|
ret = mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash );
|
||||||
|
if( ret != 0 )
|
||||||
|
return( ret );
|
||||||
|
|
||||||
if( ( ret = mbedtls_pk_sign( ctx->key, ctx->md_alg, hash, 0, sig, &sig_len,
|
if( ( ret = mbedtls_pk_sign( ctx->key, ctx->md_alg, hash, 0, sig, &sig_len,
|
||||||
f_rng, p_rng ) ) != 0 )
|
f_rng, p_rng ) ) != 0 )
|
||||||
|
Loading…
Reference in New Issue
Block a user