mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Overall PSA PAKE API style issues fixes
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
@@ -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.
|
* \return The PAKE algorithm stored in the cipher suite structure.
|
||||||
*/
|
*/
|
||||||
static psa_algorithm_t psa_pake_cs_get_algorithm(
|
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.
|
/** 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
|
* If this is 0, the PAKE algorithm in
|
||||||
* \p cipher_suite becomes unspecified.
|
* \p cipher_suite becomes unspecified.
|
||||||
*/
|
*/
|
||||||
static void psa_pake_cs_set_algorithm(
|
static void psa_pake_cs_set_algorithm( psa_pake_cipher_suite_t *cipher_suite,
|
||||||
psa_pake_cipher_suite_t* cipher_suite,
|
psa_algorithm_t algorithm );
|
||||||
psa_algorithm_t algorithm
|
|
||||||
);
|
|
||||||
|
|
||||||
/** Retrieve the primitive from a PAKE cipher suite.
|
/** 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.
|
* \return The primitive stored in the cipher suite structure.
|
||||||
*/
|
*/
|
||||||
static psa_pake_primitive_t psa_pake_cs_get_primitive(
|
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.
|
/** 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
|
* primitive type in \p cipher_suite becomes
|
||||||
* unspecified.
|
* unspecified.
|
||||||
*/
|
*/
|
||||||
static void psa_pake_cs_set_primitive(
|
static void psa_pake_cs_set_primitive( psa_pake_cipher_suite_t *cipher_suite,
|
||||||
psa_pake_cipher_suite_t* cipher_suite,
|
psa_pake_primitive_t primitive );
|
||||||
psa_pake_primitive_t primitive
|
|
||||||
);
|
|
||||||
|
|
||||||
/** Retrieve the PAKE family from a PAKE cipher suite.
|
/** 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.
|
* \return The PAKE family stored in the cipher suite structure.
|
||||||
*/
|
*/
|
||||||
static psa_pake_family_t psa_pake_cs_get_family(
|
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.
|
/** 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.
|
* \return The PAKE primitive bit-size stored in the cipher suite structure.
|
||||||
*/
|
*/
|
||||||
static uint16_t psa_pake_cs_get_bits(
|
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.
|
/** 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.
|
* the hash algorithm is not set.
|
||||||
*/
|
*/
|
||||||
static psa_algorithm_t psa_pake_cs_get_hash(
|
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.
|
/** 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
|
* If this is 0, the hash algorithm in
|
||||||
* \p cipher_suite becomes unspecified.
|
* \p cipher_suite becomes unspecified.
|
||||||
*/
|
*/
|
||||||
static void psa_pake_cs_set_hash(
|
static void psa_pake_cs_set_hash( psa_pake_cipher_suite_t *cipher_suite,
|
||||||
psa_pake_cipher_suite_t* cipher_suite,
|
psa_algorithm_t hash );
|
||||||
psa_algorithm_t hash
|
|
||||||
);
|
|
||||||
|
|
||||||
/** The type of the state data structure for PAKE operations.
|
/** 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 );
|
return( cipher_suite->hash );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void psa_pake_cs_set_hash(
|
static inline void psa_pake_cs_set_hash( psa_pake_cipher_suite_t *cipher_suite,
|
||||||
psa_pake_cipher_suite_t *cipher_suite,
|
|
||||||
psa_algorithm_t hash )
|
psa_algorithm_t hash )
|
||||||
{
|
{
|
||||||
if( !PSA_ALG_IS_HASH(hash) )
|
if( !PSA_ALG_IS_HASH(hash) )
|
||||||
|
Reference in New Issue
Block a user