summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBastien Bouclet <bastien.bouclet@gmail.com>2019-11-02 14:15:18 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-11-02 22:59:13 +0100
commit9910d6b9a49eac5ce9ab5d89dfb64327ab292a95 (patch)
tree27e9ad293caa955179204104cb537c5952057f9d /lib
parent9c49824902834bb12e26e66f4a8db74f4b9ea217 (diff)
downloadcurl-9910d6b9a49eac5ce9ab5d89dfb64327ab292a95.tar.gz
mbedtls: add error message for cert validity starting in the future
Closes #4552
Diffstat (limited to 'lib')
-rw-r--r--lib/vtls/mbedtls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index 27898505f..e34ec9d13 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -588,6 +588,9 @@ mbed_connect_step2(struct connectdata *conn,
else if(ret & MBEDTLS_X509_BADCERT_NOT_TRUSTED)
failf(data, "Cert verify failed: BADCERT_NOT_TRUSTED");
+ else if(ret & MBEDTLS_X509_BADCERT_FUTURE)
+ failf(data, "Cert verify failed: BADCERT_FUTURE");
+
return CURLE_PEER_FAILED_VERIFICATION;
}