Rename MBEDTLS_X509_INFO to !MBEDTLS_X509_REMOVE_INFO
diff --git a/library/debug.c b/library/debug.c
index 158caf1..c6788b6 100644
--- a/library/debug.c
+++ b/library/debug.c
@@ -300,7 +300,7 @@
}
#endif /* MBEDTLS_BIGNUM_C */
-#if defined(MBEDTLS_X509_CRT_PARSE_C) && defined(MBEDTLS_X509_INFO)
+#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_INFO)
static void debug_print_pk( const mbedtls_ssl_context *ssl, int level,
const char *file, int line,
const char *text, const mbedtls_pk_context *pk )
@@ -395,7 +395,7 @@
crt = crt->next;
}
}
-#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_X509_INFO */
+#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_X509_REMOVE_INFO&& MBEDTLS_X509_REMOVE_INFO !MBEDTLS_X509_REMOVE_INFO */
#if defined(MBEDTLS_ECDH_C)
static void mbedtls_debug_printf_ecdh_internal( const mbedtls_ssl_context *ssl,
diff --git a/library/oid.c b/library/oid.c
index 04918b9..6d97a57 100644
--- a/library/oid.c
+++ b/library/oid.c
@@ -53,7 +53,7 @@
/*
* Macro to generate mbedtls_oid_descriptor_t
*/
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
#define OID_DESCRIPTOR(s, name, description) { ADD_LEN(s), name, description }
#define NULL_OID_DESCRIPTOR { NULL, 0, NULL, NULL }
#else
@@ -84,7 +84,7 @@
return( NULL ); \
}
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
/*
* Macro to generate a function for retrieving a single attribute from the
* descriptor of an mbedtls_oid_descriptor_t wrapper.
@@ -97,7 +97,7 @@
*ATTR1 = data->descriptor.ATTR1; \
return( 0 ); \
}
-#endif /* MBEDTLS_X509_INFO */
+#endif /* !MBEDTLS_X509_REMOVE_INFO */
/*
* Macro to generate a function for retrieving a single attribute from an
@@ -303,7 +303,7 @@
FN_OID_TYPED_FROM_ASN1(oid_x509_ext_t, x509_ext, oid_x509_ext)
FN_OID_GET_ATTR1(mbedtls_oid_get_x509_ext_type, oid_x509_ext_t, x509_ext, int, ext_type)
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
static const mbedtls_oid_descriptor_t oid_ext_key_usage[] =
{
OID_DESCRIPTOR( MBEDTLS_OID_SERVER_AUTH, "id-kp-serverAuth", "TLS Web Server Authentication" ),
@@ -317,7 +317,7 @@
FN_OID_TYPED_FROM_ASN1(mbedtls_oid_descriptor_t, ext_key_usage, oid_ext_key_usage)
FN_OID_GET_ATTR1(mbedtls_oid_get_extended_key_usage, mbedtls_oid_descriptor_t, ext_key_usage, const char *, description)
-#endif /* MBEDTLS_X509_INFO */
+#endif /* !MBEDTLS_X509_REMOVE_INFO */
#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */
@@ -427,7 +427,7 @@
FN_OID_TYPED_FROM_ASN1(oid_sig_alg_t, sig_alg, oid_sig_alg)
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
FN_OID_GET_DESCRIPTOR_ATTR1(mbedtls_oid_get_sig_alg_desc, oid_sig_alg_t, sig_alg, const char *, description)
#endif
diff --git a/library/version_features.c b/library/version_features.c
index a1beb13..d47892c 100644
--- a/library/version_features.c
+++ b/library/version_features.c
@@ -540,9 +540,9 @@
#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE)
"MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE",
#endif /* MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE */
-#if defined(MBEDTLS_X509_INFO)
- "MBEDTLS_X509_INFO",
-#endif /* MBEDTLS_X509_INFO */
+#if defined(MBEDTLS_X509_REMOVE_INFO)
+ "MBEDTLS_X509_REMOVE_INFO",
+#endif /* MBEDTLS_X509_REMOVE_INFO */
#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT)
"MBEDTLS_X509_RSASSA_PSS_SUPPORT",
#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */
diff --git a/library/x509.c b/library/x509.c
index 1dae6cb..858dd90 100644
--- a/library/x509.c
+++ b/library/x509.c
@@ -836,7 +836,7 @@
return( (int) ( size - n ) );
}
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
/*
* Helper for writing signature algorithms
*/
@@ -881,7 +881,7 @@
return( (int)( size - n ) );
}
-#endif /* MBEDTLS_X509_INFO */
+#endif /* !MBEDTLS_X509_REMOVE_INFO */
/*
* Helper for writing "RSA key size", "EC key size", etc
diff --git a/library/x509_crl.c b/library/x509_crl.c
index 6fa0825..4f5507f 100644
--- a/library/x509_crl.c
+++ b/library/x509_crl.c
@@ -619,7 +619,7 @@
}
#endif /* MBEDTLS_FS_IO */
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
/*
* Return an informational string about the certificate.
*/
@@ -699,7 +699,7 @@
return( (int) ( size - n ) );
}
-#endif /* MBEDTLS_X509_INFO */
+#endif /* !MBEDTLS_X509_REMOVE_INFO */
/*
* Initialize a CRL chain
diff --git a/library/x509_crt.c b/library/x509_crt.c
index a1ecaa2..97d4b95 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -1413,7 +1413,7 @@
}
#endif /* MBEDTLS_FS_IO */
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
static int x509_info_subject_alt_name( char **buf, size_t *size,
const mbedtls_x509_sequence *subject_alt_name )
{
@@ -1736,7 +1736,7 @@
return( (int) ( size - n ) );
}
-#endif /* MBEDTLS_X509_INFO */
+#endif /* !MBEDTLS_X509_REMOVE_INFO */
#if defined(MBEDTLS_X509_CHECK_KEY_USAGE)
int mbedtls_x509_crt_check_key_usage( const mbedtls_x509_crt *crt,
diff --git a/library/x509_csr.c b/library/x509_csr.c
index 859be38..aa519fb 100644
--- a/library/x509_csr.c
+++ b/library/x509_csr.c
@@ -328,7 +328,7 @@
}
#endif /* MBEDTLS_FS_IO */
-#if defined(MBEDTLS_X509_INFO)
+#if !defined(MBEDTLS_X509_REMOVE_INFO)
#define BEFORE_COLON 14
#define BC "14"
/*
@@ -373,7 +373,7 @@
return( (int) ( size - n ) );
}
-#endif /* MBEDTLS_X509_INFO */
+#endif /* !MBEDTLS_X509_REMOVE_INFO */
/*
* Initialize a CSR