mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-29 10:46:52 +01:00
Moved PK key parsing from X509 module to PK module
This commit is contained in:
parent
24c0e848ed
commit
1a7550ac67
24 changed files with 1468 additions and 1320 deletions
|
|
@ -292,11 +292,11 @@ int main( int argc, char *argv[] )
|
|||
printf( " . Loading the private key ..." );
|
||||
fflush( stdout );
|
||||
|
||||
ret = x509parse_keyfile( &key, opt.filename, NULL );
|
||||
ret = pk_parse_keyfile( &key, opt.filename, NULL );
|
||||
|
||||
if( ret != 0 )
|
||||
{
|
||||
printf( " failed\n ! x509parse_keyfile returned %d", ret );
|
||||
printf( " failed\n ! pk_parse_keyfile returned %d", ret );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -458,12 +458,12 @@ int main( int argc, char *argv[] )
|
|||
printf( " . Loading the subject key ..." );
|
||||
fflush( stdout );
|
||||
|
||||
ret = x509parse_keyfile( &loaded_subject_key, opt.subject_key,
|
||||
ret = pk_parse_keyfile( &loaded_subject_key, opt.subject_key,
|
||||
opt.subject_pwd );
|
||||
if( ret != 0 )
|
||||
{
|
||||
error_strerror( ret, buf, 1024 );
|
||||
printf( " failed\n ! x509parse_keyfile returned -0x%02x - %s\n\n", -ret, buf );
|
||||
printf( " failed\n ! pk_parse_keyfile returned -0x%02x - %s\n\n", -ret, buf );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
@ -473,12 +473,12 @@ int main( int argc, char *argv[] )
|
|||
printf( " . Loading the issuer key ..." );
|
||||
fflush( stdout );
|
||||
|
||||
ret = x509parse_keyfile( &loaded_issuer_key, opt.issuer_key,
|
||||
opt.issuer_pwd );
|
||||
ret = pk_parse_keyfile( &loaded_issuer_key, opt.issuer_key,
|
||||
opt.issuer_pwd );
|
||||
if( ret != 0 )
|
||||
{
|
||||
error_strerror( ret, buf, 1024 );
|
||||
printf( " failed\n ! x509parse_keyfile returned -x%02x - %s\n\n", -ret, buf );
|
||||
printf( " failed\n ! pk_parse_keyfile returned -x%02x - %s\n\n", -ret, buf );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue