X.509 tests: obey compile-time SHA-1 support option
There is now one test case to validate that SHA-1 is rejected in
certificates by default, and one test case to validate that SHA-1 is
supported if MBEDTLS_TLS_DEFAULT_ALLOW_SHA1 is #defined.
diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h
index 383e484..78ee6e2 100644
--- a/include/mbedtls/x509_crt.h
+++ b/include/mbedtls/x509_crt.h
@@ -651,4 +651,9 @@
}
#endif
+#ifndef MBEDTLS_TLS_DEFAULT_ALLOW_SHA1
+/* The test infrastructure requires a positive define */
+#define MBEDTLS_X509__DEFAULT_FORBID_SHA1
+#endif
+
#endif /* mbedtls_x509_crt.h */