mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-04 21:56:21 +01:00
- Added test for PKCS#8 wrapped private and public keys
This commit is contained in:
parent
ed56b224de
commit
36f1b197ca
2 changed files with 28 additions and 1 deletions
|
|
@ -143,6 +143,25 @@ x509parse_keyfile:key_file:password:result
|
|||
}
|
||||
END_CASE
|
||||
|
||||
BEGIN_CASE
|
||||
x509parse_public_keyfile:key_file:result
|
||||
{
|
||||
rsa_context rsa;
|
||||
int res;
|
||||
|
||||
memset( &rsa, 0, sizeof( rsa_context ) );
|
||||
|
||||
res = x509parse_public_keyfile( &rsa, {key_file} );
|
||||
|
||||
TEST_ASSERT( res == {result} );
|
||||
|
||||
if( res == 0 )
|
||||
{
|
||||
TEST_ASSERT( rsa_check_pubkey( &rsa ) == 0 );
|
||||
}
|
||||
}
|
||||
END_CASE
|
||||
|
||||
BEGIN_CASE
|
||||
x509parse_crt:crt_data:result_str:result
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue