mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-27 01:36:59 +01:00
pk parse: the password is optional
For mbedtls_pk_parse_key and mbedtls_pk_parse_keyfile, the password is optional. Clarify what this means: NULL is ok and means no password. Validate parameters and test accordingly.
This commit is contained in:
parent
ee3cfec3cc
commit
d54b97503b
2 changed files with 12 additions and 7 deletions
|
|
@ -432,10 +432,6 @@ void invalid_parameters( )
|
|||
mbedtls_pk_parse_key( &pk,
|
||||
NULL, sizeof( buf ),
|
||||
buf, sizeof( buf ) ) );
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_PK_BAD_INPUT_DATA,
|
||||
mbedtls_pk_parse_key( &pk,
|
||||
buf, sizeof( buf ),
|
||||
NULL, sizeof( buf ) ) );
|
||||
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_PK_BAD_INPUT_DATA,
|
||||
mbedtls_pk_parse_public_key( NULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue