mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-12 22:15:36 +00:00
Readability improvements
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
44fa40cd56
commit
f8362ca847
|
@ -1373,8 +1373,8 @@
|
|||
* a supported algorithm identifier or policy.
|
||||
*/
|
||||
#define PSA_ALG_IS_RSA_PSS(alg) \
|
||||
((((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PSS_BASE) || \
|
||||
(((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PSS_ANY_SALT_BASE))
|
||||
(PSA_ALG_IS_RSA_PSS_STANDARD_SALT(alg) || \
|
||||
PSA_ALG_IS_RSA_PSS_ANY_SALT(alg))
|
||||
|
||||
#define PSA_ALG_ECDSA_BASE ((psa_algorithm_t)0x06000600)
|
||||
/** ECDSA signature with hashing.
|
||||
|
|
|
@ -456,7 +456,7 @@ static int rsa_pss_expected_salt_len( psa_algorithm_t alg,
|
|||
return( MBEDTLS_RSA_SALT_LEN_ANY );
|
||||
/* Otherwise: standard salt length, i.e. largest possible salt length
|
||||
* up to the hash length. */
|
||||
int klen = (int) (int) mbedtls_rsa_get_len( rsa ); // known to fit
|
||||
int klen = (int) mbedtls_rsa_get_len( rsa ); // known to fit
|
||||
int hlen = (int) hash_length; // known to fit
|
||||
int room = klen - 2 - hlen;
|
||||
if( room < 0 )
|
||||
|
|
Loading…
Reference in a new issue