mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
ssl_tls13_parse_certificate_verify(): optimize the code
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
@ -257,13 +257,8 @@ static int ssl_tls13_parse_certificate_verify( mbedtls_ssl_context *ssl,
|
|||||||
if( sig_alg == MBEDTLS_PK_RSASSA_PSS )
|
if( sig_alg == MBEDTLS_PK_RSASSA_PSS )
|
||||||
{
|
{
|
||||||
rsassa_pss_options.mgf1_hash_id = md_alg;
|
rsassa_pss_options.mgf1_hash_id = md_alg;
|
||||||
psa_algorithm_t psa_alg = mbedtls_psa_translate_md( md_alg );
|
|
||||||
|
|
||||||
if( psa_alg == 0 )
|
rsassa_pss_options.expected_salt_len = PSA_HASH_LENGTH( hash_alg );
|
||||||
{
|
|
||||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
|
||||||
}
|
|
||||||
rsassa_pss_options.expected_salt_len = PSA_HASH_LENGTH( psa_alg );
|
|
||||||
options = (const void*) &rsassa_pss_options;
|
options = (const void*) &rsassa_pss_options;
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */
|
#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */
|
||||||
|
Reference in New Issue
Block a user