Be more consistent about blank lines
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 190341f..e5ac7bd 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -305,6 +305,8 @@
}
}
+
+
/****************************************************************/
/* Key management */
/****************************************************************/
@@ -556,7 +558,6 @@
data_length, 0 ) );
}
-
psa_status_t psa_export_public_key( psa_key_slot_t key,
uint8_t *data,
size_t data_size,
@@ -566,6 +567,8 @@
data_length, 1 ) );
}
+
+
/****************************************************************/
/* Message digests */
/****************************************************************/
@@ -909,7 +912,6 @@
-
/****************************************************************/
/* MAC */
/****************************************************************/
@@ -1395,7 +1397,6 @@
-
/****************************************************************/
/* Asymmetric cryptography */
/****************************************************************/
@@ -1679,7 +1680,6 @@
{
return( PSA_ERROR_NOT_SUPPORTED );
}
-
}
psa_status_t psa_asymmetric_decrypt( psa_key_slot_t key,
@@ -1748,9 +1748,10 @@
{
return( PSA_ERROR_NOT_SUPPORTED );
}
-
}
+
+
/****************************************************************/
/* Symmetric cryptography */
/****************************************************************/
@@ -2015,6 +2016,7 @@
}
+
/****************************************************************/
/* Key Policy */
/****************************************************************/
@@ -2128,9 +2130,11 @@
}
+
/****************************************************************/
/* AEAD */
/****************************************************************/
+
psa_status_t psa_aead_encrypt( psa_key_slot_t key,
psa_algorithm_t alg,
const uint8_t *nonce,
@@ -2223,8 +2227,6 @@
//update the tag pointer to point to the end of the ciphertext_length
tag = ciphertext + plaintext_length;
-
-
mbedtls_ccm_init( &ccm );
ret = mbedtls_ccm_setkey( &ccm, cipher_id,
slot->data.raw.data, key_bits );
@@ -2393,6 +2395,7 @@
}
+
/****************************************************************/
/* Module setup */
/****************************************************************/
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index 5e66986..3de4745 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -145,7 +145,6 @@
}
/* END_CASE */
-
/* BEGIN_CASE */
void import_export_public_key( data_t *data,
int type_arg,
@@ -317,7 +316,6 @@
}
/* END_CASE */
-
/* BEGIN_CASE */
void cipher_encrypt( int alg_arg, int key_type_arg,
data_t *key,
@@ -524,7 +522,6 @@
}
/* END_CASE */
-
/* BEGIN_CASE */
void cipher_decrypt( int alg_arg, int key_type_arg,
data_t *key,
@@ -585,7 +582,6 @@
(size_t) expected_output->len ) == 0 );
}
-
exit:
mbedtls_free( output );
psa_destroy_key( key_slot );
@@ -593,7 +589,6 @@
}
/* END_CASE */
-
/* BEGIN_CASE */
void cipher_verify_output( int alg_arg, int key_type_arg,
data_t *key,
@@ -853,12 +848,10 @@
&output_length2 ) ==
expected_result );
-
TEST_ASSERT( memcmp( input_data->x, output_data2,
(size_t) input_data->len ) == 0 );
}
-
exit:
psa_destroy_key( slot );
mbedtls_free( output_data );
@@ -917,11 +910,9 @@
output_data, output_size,
&output_length ) == PSA_SUCCESS );
-
TEST_ASSERT( memcmp( output_data, expected_result->x,
output_length ) == 0 );
-
exit:
psa_destroy_key( slot );
mbedtls_free( output_data );
@@ -945,7 +936,6 @@
psa_key_policy_t policy = {0};
psa_status_t expected_result = (psa_status_t) expected_result_arg;
-
TEST_ASSERT( key_data != NULL );
TEST_ASSERT( input_data != NULL );
TEST_ASSERT( additional_data != NULL );
@@ -982,15 +972,12 @@
output_size, &output_length ) ==
expected_result );
-
if( expected_result == PSA_SUCCESS )
{
TEST_ASSERT( memcmp( output_data, expected_data->x,
output_length ) == 0 );
}
-
-
exit:
psa_destroy_key( slot );
mbedtls_free( output_data );
@@ -1239,7 +1226,6 @@
}
/* END_CASE */
-
/* BEGIN_CASE */
void key_lifetime_set_fail( int key_slot_arg,
int lifetime_arg,
@@ -1312,7 +1298,6 @@
data_t *signature_data,
int expected_status_arg )
{
-
int slot = 1;
psa_key_type_t key_type = key_type_arg;
psa_algorithm_t alg = alg_arg;
@@ -1345,7 +1330,6 @@
signature_data->x,
(size_t) signature_data->len );
-
TEST_ASSERT( actual_status == expected_status );
exit:
@@ -1354,7 +1338,6 @@
}
/* END_CASE */
-
/* BEGIN_CASE */
void asymmetric_encrypt_decrypt( int key_type_arg, data_t *key_data,
int alg_arg, data_t *input_data )
@@ -1420,18 +1403,14 @@
mbedtls_free( output );
mbedtls_free( output2 );
mbedtls_psa_crypto_free( );
-
}
/* END_CASE */
-
/* BEGIN_CASE */
void asymmetric_encrypt_fail( int key_type_arg, data_t *key_data,
int alg_arg, data_t *input_data,
int expected_status_arg )
{
-
-
int slot = 1;
psa_key_type_t key_type = key_type_arg;
psa_algorithm_t alg = alg_arg;
@@ -1474,7 +1453,6 @@
psa_destroy_key( slot );
mbedtls_free( output );
mbedtls_psa_crypto_free( );
-
}
/* END_CASE */
@@ -1526,18 +1504,14 @@
psa_destroy_key( slot );
mbedtls_free( output );
mbedtls_psa_crypto_free( );
-
-
}
/* END_CASE */
-
/* BEGIN_CASE */
void asymmetric_decrypt_fail( int key_type_arg, data_t *key_data,
int alg_arg, data_t *input_data,
int expected_status_arg )
{
-
int slot = 1;
psa_key_type_t key_type = key_type_arg;
psa_algorithm_t alg = alg_arg;