- Added test for PKCS#8 wrapped private and public keys

This commit is contained in:
Paul Bakker 2011-07-13 11:32:29 +00:00
parent ed56b224de
commit 36f1b197ca
2 changed files with 28 additions and 1 deletions

View file

@ -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
{