1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Updated value of expected key size when not using test_size_function

The calculation of the expected key size when not using the test_size_function
was not correct. The function has now been updated to handle all cases
properly to ensure the expected key size is correct for key pairs, public
keys, and symmetric keys.

Cleaned up some comments and removed unused includes.

Signed-off-by: John Durkop <john.durkop@fermatsoftware.com>
This commit is contained in:
John Durkop
2020-10-19 07:12:28 -07:00
parent ac93e3b43c
commit 135ce69361
3 changed files with 14 additions and 10 deletions

View File

@ -35,8 +35,8 @@ typedef struct {
/** \def TEST_DRIVER_KEY_CONTEXT_BASE_SIZE
*
* This macro returns the base size for the key context. It should include
* the size for any driver context information stored with each key.
* This macro returns the base size for the key context. It is the size of the
* driver specific information stored in each key context.
*/
#define TEST_DRIVER_KEY_CONTEXT_BASE_SIZE sizeof( test_driver_key_context_t )
@ -92,4 +92,4 @@ size_t test_size_function(
#endif /* TEST_DRIVER_KEY_CONTEXT_SIZE_FUNCTION */
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_TEST_DRIVERS_KEYGEN_H */
#endif /* PSA_CRYPTO_TEST_DRIVERS_SIZE_H */