mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-30 11:16:25 +01:00
Use both RSA and ECDSA CA if available
This commit is contained in:
parent
420edcaf1d
commit
641de714b6
9 changed files with 64 additions and 52 deletions
|
|
@ -109,8 +109,8 @@ int main( int argc, char *argv[] )
|
|||
fflush( stdout );
|
||||
|
||||
#if defined(POLARSSL_CERTS_C)
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_crt,
|
||||
strlen( test_ca_crt ) );
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_list,
|
||||
strlen( test_ca_list ) );
|
||||
#else
|
||||
ret = 1;
|
||||
printf("POLARSSL_CERTS_C not defined.");
|
||||
|
|
|
|||
|
|
@ -576,8 +576,8 @@ int main( int argc, char *argv[] )
|
|||
else
|
||||
#endif
|
||||
#if defined(POLARSSL_CERTS_C)
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_crt,
|
||||
strlen( test_ca_crt ) );
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_list,
|
||||
strlen( test_ca_list ) );
|
||||
#else
|
||||
{
|
||||
ret = 1;
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@ int main( int argc, char *argv[] )
|
|||
goto exit;
|
||||
}
|
||||
|
||||
ret = x509_crt_parse( &srvcert, (const unsigned char *) test_ca_crt,
|
||||
strlen( test_ca_crt ) );
|
||||
ret = x509_crt_parse( &srvcert, (const unsigned char *) test_ca_list,
|
||||
strlen( test_ca_list ) );
|
||||
if( ret != 0 )
|
||||
{
|
||||
printf( " failed\n ! x509_crt_parse returned %d\n\n", ret );
|
||||
|
|
|
|||
|
|
@ -484,8 +484,8 @@ int main( int argc, char *argv[] )
|
|||
else
|
||||
#endif
|
||||
#if defined(POLARSSL_CERTS_C)
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_crt,
|
||||
strlen( test_ca_crt ) );
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_list,
|
||||
strlen( test_ca_list ) );
|
||||
#else
|
||||
{
|
||||
ret = 1;
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ int main( int argc, char *argv[] )
|
|||
goto exit;
|
||||
}
|
||||
|
||||
ret = x509_crt_parse( &srvcert, (const unsigned char *) test_ca_crt,
|
||||
strlen( test_ca_crt ) );
|
||||
ret = x509_crt_parse( &srvcert, (const unsigned char *) test_ca_list,
|
||||
strlen( test_ca_list ) );
|
||||
if( ret != 0 )
|
||||
{
|
||||
printf( " failed\n ! x509_crt_parse returned %d\n\n", ret );
|
||||
|
|
|
|||
|
|
@ -549,8 +549,8 @@ int main( int argc, char *argv[] )
|
|||
else
|
||||
#endif
|
||||
#if defined(POLARSSL_CERTS_C)
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_crt,
|
||||
strlen( test_ca_crt ) );
|
||||
ret = x509_crt_parse( &cacert, (const unsigned char *) test_ca_list,
|
||||
strlen( test_ca_list ) );
|
||||
#else
|
||||
{
|
||||
ret = 1;
|
||||
|
|
|
|||
|
|
@ -218,8 +218,8 @@ static int ssl_test( struct options *opt )
|
|||
goto exit;
|
||||
}
|
||||
|
||||
ret = x509_crt_parse( &srvcert, (const unsigned char *) test_ca_crt,
|
||||
strlen( test_ca_crt ) );
|
||||
ret = x509_crt_parse( &srvcert, (const unsigned char *) test_ca_list,
|
||||
strlen( test_ca_list ) );
|
||||
if( ret != 0 )
|
||||
{
|
||||
printf( " ! x509_crt_parse returned %d\n\n", ret );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue