mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-22 08:41:10 +00:00
Fix examples that failed to compile without PEM
This commit is contained in:
parent
ee75b9b417
commit
cef21e4cd9
|
@ -37,7 +37,7 @@
|
||||||
!defined(MBEDTLS_NET_C) || !defined(MBEDTLS_TIMING_C) || \
|
!defined(MBEDTLS_NET_C) || !defined(MBEDTLS_TIMING_C) || \
|
||||||
!defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) || \
|
!defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) || \
|
||||||
!defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_RSA_C) || \
|
!defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_RSA_C) || \
|
||||||
!defined(MBEDTLS_CERTS_C)
|
!defined(MBEDTLS_CERTS_C) || !defined(MBEDTLS_PEM_PARSE_C)
|
||||||
int main( void )
|
int main( void )
|
||||||
{
|
{
|
||||||
mbedtls_printf( "MBEDTLS_SSL_CLI_C and/or MBEDTLS_SSL_PROTO_DTLS and/or "
|
mbedtls_printf( "MBEDTLS_SSL_CLI_C and/or MBEDTLS_SSL_PROTO_DTLS and/or "
|
||||||
|
|
|
@ -494,13 +494,13 @@ int main( int argc, char *argv[] )
|
||||||
ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file );
|
ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file );
|
||||||
else
|
else
|
||||||
#endif
|
#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,
|
ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_cas_pem,
|
||||||
mbedtls_test_cas_pem_len );
|
mbedtls_test_cas_pem_len );
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
ret = 1;
|
ret = 1;
|
||||||
mbedtls_printf("MBEDTLS_CERTS_C not defined.");
|
mbedtls_printf("MBEDTLS_CERTS_C and/or MBEDTLS_PEM_PARSE_C not defined.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if( ret < 0 )
|
if( ret < 0 )
|
||||||
|
|
Loading…
Reference in a new issue