mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-24 05:18:44 +00:00
Add test for x509parse_public_keyfile_ec
This commit is contained in:
@@ -179,6 +179,27 @@ x509parse_public_keyfile_rsa:key_file:result
|
||||
}
|
||||
END_CASE
|
||||
|
||||
BEGIN_CASE
|
||||
x509parse_public_keyfile_ec:key_file:result
|
||||
{
|
||||
ecp_keypair eckey;
|
||||
int res;
|
||||
|
||||
ecp_keypair_init( &eckey );
|
||||
|
||||
res = x509parse_public_keyfile_ec( &eckey, {key_file} );
|
||||
|
||||
TEST_ASSERT( res == {result} );
|
||||
|
||||
if( res == 0 )
|
||||
{
|
||||
TEST_ASSERT( ecp_check_pubkey( &eckey.grp, &eckey.Q ) == 0 );
|
||||
}
|
||||
|
||||
ecp_keypair_free( &eckey );
|
||||
}
|
||||
END_CASE
|
||||
|
||||
BEGIN_CASE
|
||||
x509parse_crt:crt_data:result_str:result
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user