mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
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.
This commit is contained in:
parent
62469d95e2
commit
4fa6bed0c6
2 changed files with 10 additions and 1 deletions
|
|
@ -651,4 +651,9 @@ int mbedtls_x509write_crt_pem( mbedtls_x509write_cert *ctx, unsigned char *buf,
|
|||
}
|
||||
#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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue