More uncrustify undo
diff --git a/include/psa/crypto.h b/include/psa/crypto.h
index bdac6c8..d5e713e 100644
--- a/include/psa/crypto.h
+++ b/include/psa/crypto.h
@@ -3584,7 +3584,8 @@
* It is implementation-dependent whether a failure to initialize
* results in this error code.
*/
-psa_status_t psa_generate_random(uint8_t * output, size_t output_size);
+psa_status_t psa_generate_random(uint8_t *output,
+ size_t output_size);
/**
* \brief Generate a key or key pair.
@@ -3624,7 +3625,8 @@
* It is implementation-dependent whether a failure to initialize
* results in this error code.
*/
-psa_status_t psa_generate_key(const psa_key_attributes_t * attributes, psa_key_handle_t * handle);
+psa_status_t psa_generate_key(const psa_key_attributes_t *attributes,
+ psa_key_handle_t *handle);
/**@}*/
diff --git a/include/psa/crypto_extra.h b/include/psa/crypto_extra.h
index 1d05e19..09a1b87 100644
--- a/include/psa/crypto_extra.h
+++ b/include/psa/crypto_extra.h
@@ -114,6 +114,22 @@
*/
psa_status_t psa_cipher_setup_vendor(psa_cipher_operation_t * operation, psa_key_handle_t handle, psa_algorithm_t alg);
+/** Perform any vendor specific action when aborting a cipher operation.
+ *
+ * This function is called at the beginning of the psa_cipher_abort function.
+ * The vendor must provide an implementation of this function to perform any
+ * vendor specific abort operation. A weakly linked implementation of this
+ * function that does nothing is provided in the implementation.
+ *
+ * This function must not be called directly.
+ *
+ * \param[in,out] operation Initialized cipher operation.
+ *
+ * \retval #PSA_SUCCESS
+ * \retval Implementation dependent return values.
+ */
+psa_status_t psa_cipher_abort_vendor(psa_cipher_operation_t * operation);
+
/** \brief Declare the enrollment algorithm for a key.
*
* An operation on a key may indifferently use the algorithm set with
@@ -133,23 +149,6 @@
* verified that the usage of the key with multiple algorithms
* is safe.
*/
-
-/** Perform any vendor specific action when aborting a cipher operation.
- *
- * This function is called at the beginning of the psa_cipher_abort function.
- * The vendor must provide an implementation of this function to perform any
- * vendor specific abort operation. A weakly linked implementation of this
- * function that does nothing is provided in the implementation.
- *
- * This function must not be called directly.
- *
- * \param[in,out] operation Initialized cipher operation.
- *
- * \retval #PSA_SUCCESS
- * \retval Implementation dependent return values.
- */
-psa_status_t psa_cipher_abort_vendor(psa_cipher_operation_t * operation);
-
static inline void psa_set_key_enrollment_algorithm(
psa_key_attributes_t *attributes,
psa_algorithm_t alg2)
diff --git a/library/psa_crypto_core.h b/library/psa_crypto_core.h
index d587549..63d1e8a 100644
--- a/library/psa_crypto_core.h
+++ b/library/psa_crypto_core.h
@@ -39,33 +39,30 @@
*/
typedef struct
{
- psa_core_key_attributes_t attr;
+ psa_core_key_attributes_t attr;
union
{
/* Raw-data key (key_type_is_raw_bytes() in psa_crypto.c) */
struct raw_data
{
uint8_t *data;
- size_t bytes;
+ size_t bytes;
} raw;
#if defined(MBEDTLS_RSA_C)
-
/* RSA public key or key pair */
- mbedtls_rsa_context * rsa;
-#endif /* MBEDTLS_RSA_C */
+ mbedtls_rsa_context *rsa;
+#endif /* MBEDTLS_RSA_C */
#if defined(MBEDTLS_ECP_C)
-
/* EC public key or key pair */
- mbedtls_ecp_keypair * ecp;
-#endif /* MBEDTLS_ECP_C */
+ mbedtls_ecp_keypair *ecp;
+#endif /* MBEDTLS_ECP_C */
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
-
/* Any key type in a secure element */
struct se
{
psa_key_slot_number_t slot_number;
} se;
-#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
+#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
void * vendor_context;
} data;
} psa_key_slot_t;
@@ -133,7 +130,8 @@
* \param[in,out] slot The key slot to modify.
* \param mask The mask of bits to clear.
*/
-static inline void psa_key_slot_clear_bits (psa_key_slot_t * slot, uint16_t mask)
+static inline void psa_key_slot_clear_bits( psa_key_slot_t *slot,
+ uint16_t mask )
{
slot->attr.flags &= ~mask;
}
@@ -176,6 +174,7 @@
* already fully wiped.
* \retval PSA_ERROR_CORRUPTION_DETECTED
*/
+psa_status_t psa_wipe_key_slot( psa_key_slot_t *slot );
/**
* \brief Sign a hash or short message with a vendor defined private key.
@@ -246,8 +245,6 @@
uint8_t * signature,
size_t signature_length);
-psa_status_t psa_wipe_key_slot(psa_key_slot_t * slot);
-
/** Import key data into a slot.
*
* `slot->type` must have been set previously.