1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Adapt x509write_pubkey interface to use PK

key_app_writer will be fixed later
This commit is contained in:
Manuel Pégourié-Gonnard
2013-09-12 00:59:40 +02:00
committed by Paul Bakker
parent 33250b0461
commit e1f821a6eb
3 changed files with 23 additions and 15 deletions

View File

@@ -132,7 +132,6 @@ void x509_pubkey_check( char *key_file )
unsigned char buf[5000];
unsigned char check_buf[5000];
int ret;
size_t olen = sizeof( check_buf );
FILE *f;
memset( buf, 0, sizeof( buf ) );
@@ -141,7 +140,7 @@ void x509_pubkey_check( char *key_file )
pk_init( &key );
TEST_ASSERT( x509parse_public_keyfile( &key, key_file ) == 0 );
ret = x509write_pubkey_pem( pk_rsa( key ), buf, sizeof( buf ) - 1);
ret = x509write_pubkey_pem( &key, buf, sizeof( buf ) - 1);
TEST_ASSERT( ret >= 0 );
f = fopen( key_file, "r" );