Overall PSA PAKE API style issues fixes

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong 2022-05-25 11:48:37 +02:00
parent eb93a6f1d8
commit 72ab56a1fe

View file

@ -1175,8 +1175,7 @@ static psa_pake_cipher_suite_t psa_pake_cipher_suite_init(void);
* \return The PAKE algorithm stored in the cipher suite structure.
*/
static psa_algorithm_t psa_pake_cs_get_algorithm(
const psa_pake_cipher_suite_t* cipher_suite
);
const psa_pake_cipher_suite_t *cipher_suite );
/** Declare the PAKE algorithm for the cipher suite.
*
@ -1194,10 +1193,8 @@ static psa_algorithm_t psa_pake_cs_get_algorithm(
* If this is 0, the PAKE algorithm in
* \p cipher_suite becomes unspecified.
*/
static void psa_pake_cs_set_algorithm(
psa_pake_cipher_suite_t* cipher_suite,
psa_algorithm_t algorithm
);
static void psa_pake_cs_set_algorithm( psa_pake_cipher_suite_t *cipher_suite,
psa_algorithm_t algorithm );
/** Retrieve the primitive from a PAKE cipher suite.
*
@ -1210,8 +1207,7 @@ static void psa_pake_cs_set_algorithm(
* \return The primitive stored in the cipher suite structure.
*/
static psa_pake_primitive_t psa_pake_cs_get_primitive(
const psa_pake_cipher_suite_t* cipher_suite
);
const psa_pake_cipher_suite_t *cipher_suite );
/** Declare the primitive for a PAKE cipher suite.
*
@ -1226,10 +1222,8 @@ static psa_pake_primitive_t psa_pake_cs_get_primitive(
* primitive type in \p cipher_suite becomes
* unspecified.
*/
static void psa_pake_cs_set_primitive(
psa_pake_cipher_suite_t* cipher_suite,
psa_pake_primitive_t primitive
);
static void psa_pake_cs_set_primitive( psa_pake_cipher_suite_t *cipher_suite,
psa_pake_primitive_t primitive );
/** Retrieve the PAKE family from a PAKE cipher suite.
*
@ -1242,8 +1236,7 @@ static void psa_pake_cs_set_primitive(
* \return The PAKE family stored in the cipher suite structure.
*/
static psa_pake_family_t psa_pake_cs_get_family(
const psa_pake_cipher_suite_t* cipher_suite
);
const psa_pake_cipher_suite_t *cipher_suite );
/** Retrieve the PAKE primitive bit-size from a PAKE cipher suite.
*
@ -1256,8 +1249,7 @@ static psa_pake_family_t psa_pake_cs_get_family(
* \return The PAKE primitive bit-size stored in the cipher suite structure.
*/
static uint16_t psa_pake_cs_get_bits(
const psa_pake_cipher_suite_t* cipher_suite
);
const psa_pake_cipher_suite_t *cipher_suite );
/** Retrieve the hash algorithm from a PAKE cipher suite.
*
@ -1272,8 +1264,7 @@ static uint16_t psa_pake_cs_get_bits(
* the hash algorithm is not set.
*/
static psa_algorithm_t psa_pake_cs_get_hash(
const psa_pake_cipher_suite_t* cipher_suite
);
const psa_pake_cipher_suite_t *cipher_suite );
/** Declare the hash algorithm for a PAKE cipher suite.
*
@ -1295,10 +1286,8 @@ static psa_algorithm_t psa_pake_cs_get_hash(
* If this is 0, the hash algorithm in
* \p cipher_suite becomes unspecified.
*/
static void psa_pake_cs_set_hash(
psa_pake_cipher_suite_t* cipher_suite,
psa_algorithm_t hash
);
static void psa_pake_cs_set_hash( psa_pake_cipher_suite_t *cipher_suite,
psa_algorithm_t hash );
/** The type of the state data structure for PAKE operations.
*
@ -1913,8 +1902,7 @@ static inline psa_algorithm_t psa_pake_cs_get_hash(
return( cipher_suite->hash );
}
static inline void psa_pake_cs_set_hash(
psa_pake_cipher_suite_t *cipher_suite,
static inline void psa_pake_cs_set_hash( psa_pake_cipher_suite_t *cipher_suite,
psa_algorithm_t hash )
{
if( !PSA_ALG_IS_HASH(hash) )