mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Fix examples that failed to compile without PEM
This commit is contained in:
parent
2537f37faf
commit
0eced5aae5
2 changed files with 3 additions and 3 deletions
|
|
@ -494,13 +494,13 @@ int main( int argc, char *argv[] )
|
|||
ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file );
|
||||
else
|
||||
#endif
|
||||
#if defined(MBEDTLS_CERTS_C)
|
||||
#if defined(MBEDTLS_CERTS_C) && defined(MBEDTLS_PEM_PARSE_C)
|
||||
ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_cas_pem,
|
||||
mbedtls_test_cas_pem_len );
|
||||
#else
|
||||
{
|
||||
ret = 1;
|
||||
mbedtls_printf("MBEDTLS_CERTS_C not defined.");
|
||||
mbedtls_printf("MBEDTLS_CERTS_C and/or MBEDTLS_PEM_PARSE_C not defined.");
|
||||
}
|
||||
#endif
|
||||
if( ret < 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue