Add missing const on policy_get_xxx function parameter

This commit is contained in:
Gilles Peskine 2018-07-12 00:54:56 +02:00 committed by itayzafrir
parent 7256e6c9a4
commit aa7bc47f73
2 changed files with 4 additions and 4 deletions

View file

@ -1205,10 +1205,10 @@ void psa_key_policy_set_usage(psa_key_policy_t *policy,
psa_algorithm_t alg); psa_algorithm_t alg);
/** \brief Retrieve the usage field of a policy structure. */ /** \brief Retrieve the usage field of a policy structure. */
psa_key_usage_t psa_key_policy_get_usage(psa_key_policy_t *policy); psa_key_usage_t psa_key_policy_get_usage(const psa_key_policy_t *policy);
/** \brief Retrieve the algorithm field of a policy structure. */ /** \brief Retrieve the algorithm field of a policy structure. */
psa_algorithm_t psa_key_policy_get_algorithm(psa_key_policy_t *policy); psa_algorithm_t psa_key_policy_get_algorithm(const psa_key_policy_t *policy);
/** \brief Set the usage policy on a key slot. /** \brief Set the usage policy on a key slot.
* *

View file

@ -2585,12 +2585,12 @@ void psa_key_policy_set_usage( psa_key_policy_t *policy,
policy->alg = alg; policy->alg = alg;
} }
psa_key_usage_t psa_key_policy_get_usage( psa_key_policy_t *policy ) psa_key_usage_t psa_key_policy_get_usage( const psa_key_policy_t *policy )
{ {
return( policy->usage ); return( policy->usage );
} }
psa_algorithm_t psa_key_policy_get_algorithm( psa_key_policy_t *policy ) psa_algorithm_t psa_key_policy_get_algorithm( const psa_key_policy_t *policy )
{ {
return( policy->alg ); return( policy->alg );
} }