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 fe821d1..937dcd4 100644
--- a/include/mbedtls/x509_crt.h
+++ b/include/mbedtls/x509_crt.h
@@ -642,4 +642,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 */