diff --git a/tests/include/test/pk_helpers.h b/tests/include/test/pk_helpers.h index cc7405379..063945c3b 100644 --- a/tests/include/test/pk_helpers.h +++ b/tests/include/test/pk_helpers.h @@ -28,11 +28,11 @@ typedef enum { * predefined keys, an assertion failure will be generated an the test will * fail. * - * \param key_type: PSA key type for the key being requested. - * \param key_bits: bit length for the PSA key being requested. - * \param output: pointer which on exit will point to the key material that has - * been requested by "key_type" and "key_bits". - * \param output_len: length of the key material being pointed to from "output". + * \param key_type PSA key type for the key being requested. + * \param key_bits Bit length for the PSA key being requested. + * \param output Pointer which on exit will point to the key material that has + * been requested by "key_type" and "key_bits". + * \param output_len Length of the key material being pointed to from "output". */ void mbedtls_pk_helpers_get_predefined_key_data(psa_key_type_t key_type, psa_key_bits_t key_bits, const uint8_t **output, size_t *output_len); @@ -43,12 +43,12 @@ void mbedtls_pk_helpers_get_predefined_key_data(psa_key_type_t key_type, psa_key * Predefined key data is used to create the key and the choice of predefined * key material is based on the combination of "key_type" and "key_bits". * - * \param key_type: type of key to be created. For the time being only RSA and - * EC key types are supported. - * \param key_bits: length of the key (in bits). - * \param alg: algorithm to be associated with the key. - * \param alg2: enrollmente alogrithm to be associated with the key. - * \param usage_flags: usage flags to be associated with the key. + * \param key_type Type of key to be created. For the time being only RSA and + * EC key types are supported. + * \param key_bits Length of the key (in bits). + * \param alg Algorithm to be associated with the key. + * \param alg2 Enrollmente alogrithm to be associated with the key. + * \param usage_flags Usage flags to be associated with the key. * * \return the key ID of the created PSA key. */ @@ -61,10 +61,10 @@ mbedtls_svc_key_id_t mbedtls_pk_helpers_make_psa_key_from_predefined(psa_key_typ /** * Populate the given PK context using "key_id" and the desired "method". * - * \param pk: the PK context to be populated; it must have been initialized. - * \param key_id: the PSA key ID to be used to populate the PK context. - * \param method: the desired method for populating the PK context. See - * "pk_context_populate_method_t" for available options. + * \param pk The PK context to be populated; it must have been initialized. + * \param key_id The PSA key ID to be used to populate the PK context. + * \param method The desired method for populating the PK context. See + * "pk_context_populate_method_t" for available options. */ void mbedtls_pk_helpers_populate_context(mbedtls_pk_context *pk, mbedtls_svc_key_id_t key_id, pk_context_populate_method_t method); diff --git a/tests/src/pk_helpers.c b/tests/src/pk_helpers.c index 44992c675..7fa1f5136 100644 --- a/tests/src/pk_helpers.c +++ b/tests/src/pk_helpers.c @@ -24,21 +24,21 @@ typedef struct { psa_key_type_t key_type; psa_key_bits_t key_bits; - const uint8_t* key; + const uint8_t *key; size_t key_len; } mbedtls_pk_helpers_predefined_key_t; -#define EC_KEY(family_type, bits, array_base_name) \ - {PSA_KEY_TYPE_ECC_KEY_PAIR(family_type), bits, \ - array_base_name ## _priv, sizeof(array_base_name ## _priv)}, \ - {PSA_KEY_TYPE_ECC_PUBLIC_KEY(family_type), bits, \ - array_base_name ## _pub, sizeof(array_base_name ## _pub)} +#define EC_KEY(family_type, bits, array_base_name) \ + { PSA_KEY_TYPE_ECC_KEY_PAIR(family_type), bits, \ + array_base_name ## _priv, sizeof(array_base_name ## _priv) }, \ + { PSA_KEY_TYPE_ECC_PUBLIC_KEY(family_type), bits, \ + array_base_name ## _pub, sizeof(array_base_name ## _pub) } -#define RSA_KEY(bits, array_base_name) \ - {PSA_KEY_TYPE_RSA_KEY_PAIR, bits, \ - array_base_name ## _priv, sizeof(array_base_name ## _priv)}, \ - {PSA_KEY_TYPE_RSA_PUBLIC_KEY, bits, \ - array_base_name ## _pub, sizeof(array_base_name ## _pub)} +#define RSA_KEY(bits, array_base_name) \ + { PSA_KEY_TYPE_RSA_KEY_PAIR, bits, \ + array_base_name ## _priv, sizeof(array_base_name ## _priv) }, \ + { PSA_KEY_TYPE_RSA_PUBLIC_KEY, bits, \ + array_base_name ## _pub, sizeof(array_base_name ## _pub) } static mbedtls_pk_helpers_predefined_key_t predefined_keys_psa[] = { EC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1, 256, test_ec_bp256r1),