mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-11-09 23:00:03 +08:00
Only the length of not_before and not_after was checked, so malformed timestamps were written into the certificate as is, and a year before 1950 was written as a UTCTime that reads back as 20YY. Signed-off-by: Naveed <naveed@bugqore.com>
8 lines
402 B
Plaintext
8 lines
402 B
Plaintext
Bugfix
|
|
* mbedtls_x509write_crt_set_validity() only checked the length of the
|
|
not_before and not_after strings, so timestamps with non-digit
|
|
characters or out-of-range fields were written into the certificate
|
|
as is, and a year before 1950 was written as a UTCTime that reads
|
|
back as a year in 2000-2049. Such timestamps are now rejected with
|
|
MBEDTLS_ERR_X509_BAD_INPUT_DATA.
|