mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-20 22:05:15 +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:
parent
b0f148c0ab
commit
735b37eeef
3 changed files with 28 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue