mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-01 12:32:43 +00:00
Readability improvements
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
b9b817e977
commit
f6892dec2a
@ -1425,8 +1425,8 @@
|
|||||||
* a supported algorithm identifier or policy.
|
* a supported algorithm identifier or policy.
|
||||||
*/
|
*/
|
||||||
#define PSA_ALG_IS_RSA_PSS(alg) \
|
#define PSA_ALG_IS_RSA_PSS(alg) \
|
||||||
((((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PSS_BASE) || \
|
(PSA_ALG_IS_RSA_PSS_STANDARD_SALT(alg) || \
|
||||||
(((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PSS_ANY_SALT_BASE))
|
PSA_ALG_IS_RSA_PSS_ANY_SALT(alg))
|
||||||
|
|
||||||
#define PSA_ALG_ECDSA_BASE ((psa_algorithm_t)0x06000600)
|
#define PSA_ALG_ECDSA_BASE ((psa_algorithm_t)0x06000600)
|
||||||
/** ECDSA signature with hashing.
|
/** ECDSA signature with hashing.
|
||||||
|
@ -462,7 +462,7 @@ static int rsa_pss_expected_salt_len( psa_algorithm_t alg,
|
|||||||
return( MBEDTLS_RSA_SALT_LEN_ANY );
|
return( MBEDTLS_RSA_SALT_LEN_ANY );
|
||||||
/* Otherwise: standard salt length, i.e. largest possible salt length
|
/* Otherwise: standard salt length, i.e. largest possible salt length
|
||||||
* up to the hash 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 hlen = (int) hash_length; // known to fit
|
||||||
int room = klen - 2 - hlen;
|
int room = klen - 2 - hlen;
|
||||||
if( room < 0 )
|
if( room < 0 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user