Skip to content

Commit a6f98b7

Browse files
author
Mika Leppänen
committed
Flagged extended key usage call with mbedTLS flags
1 parent 0675a89 commit a6f98b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/Security/protocols/tls_sec_prot/tls_sec_prot_lib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,13 @@ static int8_t tls_sec_prot_lib_subject_alternative_name_validate(mbedtls_x509_cr
530530

531531
static int8_t tls_sec_prot_lib_extended_key_usage_validate(mbedtls_x509_crt *crt)
532532
{
533+
#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE)
533534
// Extended key usage must be present
534535
if (mbedtls_x509_crt_check_extended_key_usage(crt, MBEDTLS_OID_WISUN_FAN, sizeof(MBEDTLS_OID_WISUN_FAN) - 1) != 0) {
535536
tr_error("invalid extended key usage");
536537
return -1; // FAIL
537538
}
539+
#endif
538540
return 0;
539541
}
540542

0 commit comments

Comments
 (0)