mirror of
https://github.com/espressif/mbedtls.git
synced 2026-10-26 18:43:48 +00:00
fix(mbedtls): remove logical dead code
This commit is contained in:
+5
-9
@@ -1346,15 +1346,11 @@ int mbedtls_pk_sign_ext(mbedtls_pk_type_t pk_type,
|
||||
|
||||
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
|
||||
|
||||
if (pk_type == MBEDTLS_PK_RSASSA_PSS) {
|
||||
mbedtls_rsa_alt_context *rsa_alt = ctx->pk_ctx;
|
||||
mbedtls_rsa_context *rsa = (mbedtls_rsa_context *)rsa_alt->key;
|
||||
mbedtls_rsa_set_padding(rsa, MBEDTLS_RSA_PKCS_V21, md_alg);
|
||||
return mbedtls_pk_sign(ctx, md_alg, hash, hash_len,
|
||||
sig, sig_size, sig_len, f_rng, p_rng);
|
||||
} else {
|
||||
return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE;
|
||||
}
|
||||
mbedtls_rsa_alt_context *rsa_alt = ctx->pk_ctx;
|
||||
mbedtls_rsa_context *rsa = (mbedtls_rsa_context *)rsa_alt->key;
|
||||
mbedtls_rsa_set_padding(rsa, MBEDTLS_RSA_PKCS_V21, md_alg);
|
||||
return mbedtls_pk_sign(ctx, md_alg, hash, hash_len,
|
||||
sig, sig_size, sig_len, f_rng, p_rng);
|
||||
|
||||
#else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user