mbedtls/ChangeLog.d/x509write-set-validity-check.txt
Naveed b74390eb70 Validate timestamps in mbedtls_x509write_crt_set_validity
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>
2026-09-20 15:45:20 +05:30

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.