Rename MBEDTLS_X509_INFO to !MBEDTLS_X509_REMOVE_INFO

The introduction of positive options to control the presence
of pre-existing functionality breaks the build for users of
handwritten configurations.

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
Hanno Becker 2020-10-09 09:19:39 +01:00 committed by Chris Jones
parent 9a969b66c1
commit 612a2f1504
28 changed files with 112 additions and 112 deletions

View file

@ -529,12 +529,12 @@ static unsigned char peer_crt_info[1024];
static int my_verify( void *data, mbedtls_x509_crt *crt,
int depth, uint32_t *flags )
{
#if defined(MBEDTLS_X509_INFO)
#if !defined(MBEDTLS_X509_REMOVE_INFO)
char buf[1024];
#endif
((void) data);
#if defined(MBEDTLS_X509_INFO)
#if !defined(MBEDTLS_X509_REMOVE_INFO)
mbedtls_x509_crt_info( buf, sizeof( buf ) - 1, "", crt );
if( depth == 0 )
memcpy( peer_crt_info, buf, sizeof( buf ) );
@ -553,7 +553,7 @@ static int my_verify( void *data, mbedtls_x509_crt *crt,
mbedtls_printf( " This certificate has no flags\n" );
else
{
#if defined(MBEDTLS_X509_INFO)
#if !defined(MBEDTLS_X509_REMOVE_INFO)
mbedtls_x509_crt_verify_info( buf, sizeof( buf ), " ! ", *flags );
mbedtls_printf( "%s\n", buf );
#endif
@ -2284,13 +2284,13 @@ int main( int argc, char *argv[] )
if( ( flags = mbedtls_ssl_get_verify_result( &ssl ) ) != 0 )
{
#if defined(MBEDTLS_X509_INFO)
#if !defined(MBEDTLS_X509_REMOVE_INFO)
char vrfy_buf[512];
#endif
mbedtls_printf( " failed\n" );
#if defined(MBEDTLS_X509_INFO)
#if !defined(MBEDTLS_X509_REMOVE_INFO)
mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ),
" ! ", flags );