mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 12:55:46 +01:00
Minor documentation improvements
This commit is contained in:
parent
52315e4c16
commit
549ea8676a
@ -83,7 +83,7 @@ extern "C" {
|
|||||||
* attacks based on arithmetic relations between different
|
* attacks based on arithmetic relations between different
|
||||||
* computations made with the same key, or can escalate harmless
|
* computations made with the same key, or can escalate harmless
|
||||||
* side channels into exploitable ones. Use this function only
|
* side channels into exploitable ones. Use this function only
|
||||||
* if it is necessary to support a protocol for which is has been
|
* if it is necessary to support a protocol for which it has been
|
||||||
* verified that the usage of the key with multiple algorithms
|
* verified that the usage of the key with multiple algorithms
|
||||||
* is safe.
|
* is safe.
|
||||||
*/
|
*/
|
||||||
|
@ -748,7 +748,7 @@ static psa_algorithm_t psa_key_policy_algorithm_intersection(
|
|||||||
psa_algorithm_t alg1,
|
psa_algorithm_t alg1,
|
||||||
psa_algorithm_t alg2 )
|
psa_algorithm_t alg2 )
|
||||||
{
|
{
|
||||||
/* Common case: the policy only allows alg. */
|
/* Common case: both sides actually specify the same policy. */
|
||||||
if( alg1 == alg2 )
|
if( alg1 == alg2 )
|
||||||
return( alg1 );
|
return( alg1 );
|
||||||
/* If the policies are from the same hash-and-sign family, check
|
/* If the policies are from the same hash-and-sign family, check
|
||||||
@ -769,12 +769,12 @@ static psa_algorithm_t psa_key_policy_algorithm_intersection(
|
|||||||
static int psa_key_algorithm_permits( psa_algorithm_t policy_alg,
|
static int psa_key_algorithm_permits( psa_algorithm_t policy_alg,
|
||||||
psa_algorithm_t requested_alg )
|
psa_algorithm_t requested_alg )
|
||||||
{
|
{
|
||||||
/* Common case: the policy only allows alg. */
|
/* Common case: the policy only allows requested_alg. */
|
||||||
if( requested_alg == policy_alg )
|
if( requested_alg == policy_alg )
|
||||||
return( 1 );
|
return( 1 );
|
||||||
/* If policy_alg is a hash-and-sign with a wildcard for the hash,
|
/* If policy_alg is a hash-and-sign with a wildcard for the hash,
|
||||||
* and alg is the same hash-and-sign family with any hash,
|
* and requested_alg is the same hash-and-sign family with any hash,
|
||||||
* then alg is compliant with policy_alg. */
|
* then requested_alg is compliant with policy_alg. */
|
||||||
if( PSA_ALG_IS_HASH_AND_SIGN( requested_alg ) &&
|
if( PSA_ALG_IS_HASH_AND_SIGN( requested_alg ) &&
|
||||||
PSA_ALG_SIGN_GET_HASH( policy_alg ) == PSA_ALG_ANY_HASH )
|
PSA_ALG_SIGN_GET_HASH( policy_alg ) == PSA_ALG_ANY_HASH )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user