mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-19 00:39:46 +00:00
Correctly handle leap year in x509_date_is_valid()
This patch ensures that invalid dates on leap years with 100 or 400 years intervals are handled correctly.
This commit is contained in:
committed by
Simon Butcher
parent
b0f148c0ab
commit
735b37eeef
@@ -1670,3 +1670,18 @@ X509 Get time (UTC invalid character in sec)
|
||||
depends_on:MBEDTLS_X509_USE_C
|
||||
x509_get_time:MBEDTLS_ASN1_UTC_TIME:"0011302359n0Z":MBEDTLS_ERR_X509_INVALID_DATE:0:0:0:0:0:0
|
||||
|
||||
X509 Get time (Generalized Time invalid leap year multiple of 4 and 100)
|
||||
depends_on:MBEDTLS_X509_USE_C
|
||||
x509_get_time:MBEDTLS_ASN1_GENERALIZED_TIME:"19000229000000Z":MBEDTLS_ERR_X509_INVALID_DATE:0:0:0:0:0:0
|
||||
|
||||
X509 Get time (Generalized Time year multiple of 4 and not multiple of 100)
|
||||
depends_on:MBEDTLS_X509_USE_C
|
||||
x509_get_time:MBEDTLS_ASN1_GENERALIZED_TIME:"19920229000000Z":0:1992:2:29:0:0:0
|
||||
|
||||
X509 Get time (Generalized Time year multiple of 400)
|
||||
depends_on:MBEDTLS_X509_USE_C
|
||||
x509_get_time:MBEDTLS_ASN1_GENERALIZED_TIME:"20000229000000Z":0:2000:2:29:0:0:0
|
||||
|
||||
X509 Get time (Generalized Time invalid leap year not multiple of 4, 100 or 400)
|
||||
depends_on:MBEDTLS_X509_USE_C
|
||||
x509_get_time:MBEDTLS_ASN1_GENERALIZED_TIME:"19910229000000Z":MBEDTLS_ERR_X509_INVALID_DATE:0:0:0:0:0:0
|
||||
|
||||
Reference in New Issue
Block a user