Newlines at end of file + trim trailing whitespace

Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
This commit is contained in:
Aditya Deshpande 2022-10-14 16:41:40 +01:00
parent 17845b8f71
commit 40c05cc8e4
5 changed files with 31 additions and 31 deletions

View file

@ -5841,8 +5841,8 @@ psa_status_t psa_key_agreement_raw_builtin( const psa_key_attributes_t *attribut
/** Internal function for raw key agreement /** Internal function for raw key agreement
* Calls the driver wrapper which will hand off key agreement task * Calls the driver wrapper which will hand off key agreement task
* to the driver's implementation if a driver is present. * to the driver's implementation if a driver is present.
* Fallback specified in the driver wrapper is built-in raw key agreement * Fallback specified in the driver wrapper is built-in raw key agreement
* (psa_key_agreement_raw_builtin). * (psa_key_agreement_raw_builtin).
*/ */
static psa_status_t psa_key_agreement_raw_internal( psa_algorithm_t alg, static psa_status_t psa_key_agreement_raw_internal( psa_algorithm_t alg,
@ -5861,9 +5861,9 @@ static psa_status_t psa_key_agreement_raw_internal( psa_algorithm_t alg,
}; };
return( psa_driver_wrapper_key_agreement( &attributes, private_key->key.data, return( psa_driver_wrapper_key_agreement( &attributes, private_key->key.data,
private_key->key.bytes, private_key->key.bytes,
alg, peer_key, peer_key_length, alg, peer_key, peer_key_length,
shared_secret, shared_secret_size, shared_secret, shared_secret_size,
shared_secret_length ) ); shared_secret_length ) );
} }

View file

@ -548,7 +548,7 @@ psa_status_t psa_verify_hash_builtin(
psa_status_t psa_validate_unstructured_key_bit_size( psa_key_type_t type, psa_status_t psa_validate_unstructured_key_bit_size( psa_key_type_t type,
size_t bits ); size_t bits );
/** Perform a key agreement and return the raw shared secret, using /** Perform a key agreement and return the raw shared secret, using
built-in raw key agreement functions. built-in raw key agreement functions.
* *
* \note The signature of this function is that of a PSA driver * \note The signature of this function is that of a PSA driver
@ -556,24 +556,24 @@ psa_status_t psa_validate_unstructured_key_bit_size( psa_key_type_t type,
* entry point as defined in the PSA driver interface specification for * entry point as defined in the PSA driver interface specification for
* transparent drivers. * transparent drivers.
* *
* \param[in] attributes The attributes of the key to use for * \param[in] attributes The attributes of the key to use for the
* the operation. * operation.
* \param[in] key_buffer The buffer containing the private key * \param[in] key_buffer The buffer containing the private key
* context. * context.
* \param[in] key_buffer_size Size of the \p key_buffer buffer in * \param[in] key_buffer_size Size of the \p key_buffer buffer in
* bytes. * bytes.
* \param[in] alg A key agreement algorithm that is * \param[in] alg A key agreement algorithm that is
* compatible with the type of the key. * compatible with the type of the key.
* \param[in] peer_key The buffer containing the key context * \param[in] peer_key The buffer containing the key context
* of the peer's public key. * of the peer's public key.
* \param[in] peer_key_length Size of the \p peer_key buffer in * \param[in] peer_key_length Size of the \p peer_key buffer in
* bytes. * bytes.
* \param[out] shared_secret The buffer to which the shared secret * \param[out] shared_secret The buffer to which the shared secret
* is to be written. * is to be written.
* \param[in] shared_secret_size Size of the \p shared_secret buffer in * \param[in] shared_secret_size Size of the \p shared_secret buffer in
* bytes. * bytes.
* \param[out] shared_secret_length On success, the number of bytes that * \param[out] shared_secret_length On success, the number of bytes that make
* make up the returned shared secret. * up the returned shared secret.
* \retval #PSA_SUCCESS * \retval #PSA_SUCCESS
* Success. Shared secret successfully calculated. * Success. Shared secret successfully calculated.
* \retval #PSA_ERROR_INVALID_HANDLE * \retval #PSA_ERROR_INVALID_HANDLE
@ -594,7 +594,7 @@ psa_status_t psa_validate_unstructured_key_bit_size( psa_key_type_t type,
* \retval #PSA_ERROR_STORAGE_FAILURE * \retval #PSA_ERROR_STORAGE_FAILURE
* \retval #PSA_ERROR_BAD_STATE * \retval #PSA_ERROR_BAD_STATE
*/ */
psa_status_t psa_key_agreement_raw_builtin( psa_status_t psa_key_agreement_raw_builtin(
const psa_key_attributes_t *attributes, const psa_key_attributes_t *attributes,
const uint8_t *key_buffer, const uint8_t *key_buffer,
size_t key_buffer_size, size_t key_buffer_size,
@ -604,5 +604,5 @@ psa_status_t psa_key_agreement_raw_builtin(
uint8_t *shared_secret, uint8_t *shared_secret,
size_t shared_secret_size, size_t shared_secret_size,
size_t *shared_secret_length ); size_t *shared_secret_length );
#endif /* PSA_CRYPTO_CORE_H */ #endif /* PSA_CRYPTO_CORE_H */

View file

@ -2501,7 +2501,7 @@ psa_status_t psa_driver_wrapper_key_agreement(
shared_secret_size, shared_secret_size,
shared_secret_length ); shared_secret_length );
return( status ); return( status );
default: default:
(void) attributes; (void) attributes;
(void) key_buffer; (void) key_buffer;
@ -2512,7 +2512,7 @@ psa_status_t psa_driver_wrapper_key_agreement(
(void) shared_secret_size; (void) shared_secret_size;
(void) shared_secret_length; (void) shared_secret_length;
return( PSA_ERROR_NOT_SUPPORTED ); return( PSA_ERROR_NOT_SUPPORTED );
} }
} }

View file

@ -68,4 +68,4 @@ psa_status_t mbedtls_test_opaque_key_agreement(
size_t *shared_secret_length ); size_t *shared_secret_length );
#endif /*PSA_CRYPTO_DRIVER_TEST */ #endif /*PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_TEST_DRIVERS_KEY_AGREEMENT_H */ #endif /* PSA_CRYPTO_TEST_DRIVERS_KEY_AGREEMENT_H */

View file

@ -58,7 +58,7 @@ psa_status_t mbedtls_test_transparent_key_agreement(
return( PSA_SUCCESS ); return( PSA_SUCCESS );
} }
return( psa_key_agreement_raw_builtin( return( psa_key_agreement_raw_builtin(
attributes, attributes,
key_buffer, key_buffer,
key_buffer_size, key_buffer_size,
@ -70,4 +70,4 @@ psa_status_t mbedtls_test_transparent_key_agreement(
shared_secret_length ) ); shared_secret_length ) );
} }
#endif /* MBEDTLS_PSA_CRYPTO_DRIVERS && PSA_CRYPTO_DRIVER_TEST */ #endif /* MBEDTLS_PSA_CRYPTO_DRIVERS && PSA_CRYPTO_DRIVER_TEST */