mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-09 03:05:33 +00:00
Add dep of mbedtls_rsa_rsassa_pkcs1_v15_verify on ASN.1 parsing
This commit is contained in:
parent
a359f2764c
commit
4577beb945
|
@ -552,6 +552,7 @@ int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx,
|
||||||
const unsigned char *hash,
|
const unsigned char *hash,
|
||||||
const unsigned char *sig );
|
const unsigned char *sig );
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_ASN1PARSE_C)
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v1.5 verification (RSASSA-PKCS1-v1_5-VERIFY)
|
* \brief Perform a PKCS#1 v1.5 verification (RSASSA-PKCS1-v1_5-VERIFY)
|
||||||
*
|
*
|
||||||
|
@ -578,6 +579,7 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx,
|
||||||
unsigned int hashlen,
|
unsigned int hashlen,
|
||||||
const unsigned char *hash,
|
const unsigned char *hash,
|
||||||
const unsigned char *sig );
|
const unsigned char *sig );
|
||||||
|
#endif /* MBEDTLS_ASN1PARSE_C */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY)
|
* \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY)
|
||||||
|
|
|
@ -1460,7 +1460,7 @@ int mbedtls_rsa_rsassa_pss_verify( mbedtls_rsa_context *ctx,
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PKCS1_V21 */
|
#endif /* MBEDTLS_PKCS1_V21 */
|
||||||
|
|
||||||
#if defined(MBEDTLS_PKCS1_V15)
|
#if defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_ASN1PARSE_C)
|
||||||
/*
|
/*
|
||||||
* Implementation of the PKCS#1 v2.1 RSASSA-PKCS1-v1_5-VERIFY function
|
* Implementation of the PKCS#1 v2.1 RSASSA-PKCS1-v1_5-VERIFY function
|
||||||
*/
|
*/
|
||||||
|
@ -1589,7 +1589,7 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx,
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PKCS1_V15 */
|
#endif /* MBEDTLS_PKCS1_V15 && MBEDTLS_ASN1PARSE_C */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do an RSA operation and check the message digest
|
* Do an RSA operation and check the message digest
|
||||||
|
@ -1605,7 +1605,7 @@ int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx,
|
||||||
{
|
{
|
||||||
switch( ctx->padding )
|
switch( ctx->padding )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_PKCS1_V15)
|
#if defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_ASN1PARSE_C)
|
||||||
case MBEDTLS_RSA_PKCS_V15:
|
case MBEDTLS_RSA_PKCS_V15:
|
||||||
return mbedtls_rsa_rsassa_pkcs1_v15_verify( ctx, f_rng, p_rng, mode, md_alg,
|
return mbedtls_rsa_rsassa_pkcs1_v15_verify( ctx, f_rng, p_rng, mode, md_alg,
|
||||||
hashlen, hash, sig );
|
hashlen, hash, sig );
|
||||||
|
|
Loading…
Reference in a new issue