summaryrefslogtreecommitdiff
path: root/thirdparty/mbedtls/library/x509write_crt.c
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-18 15:38:13 +0200
committerGitHub <noreply@github.com>2022-07-18 15:38:13 +0200
commit5ca5381f2c8d910e32cac078529e6a35cc40c136 (patch)
treeb6729671dfe327ccc6b058e6f7e9a643e8298128 /thirdparty/mbedtls/library/x509write_crt.c
parent4e9d3130f509472cde6eeaacaa0062d841cbebef (diff)
parent9403a68853784e542bbff51a84e6dc5c89241d2b (diff)
Merge pull request #63146 from Faless/mbedtls/2.18.1
Diffstat (limited to 'thirdparty/mbedtls/library/x509write_crt.c')
-rw-r--r--thirdparty/mbedtls/library/x509write_crt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thirdparty/mbedtls/library/x509write_crt.c b/thirdparty/mbedtls/library/x509write_crt.c
index 184c90cd33..0c5e991834 100644
--- a/thirdparty/mbedtls/library/x509write_crt.c
+++ b/thirdparty/mbedtls/library/x509write_crt.c
@@ -299,7 +299,7 @@ static int x509_write_time( unsigned char **p, unsigned char *start,
/*
* write MBEDTLS_ASN1_UTC_TIME if year < 2050 (2 bytes shorter)
*/
- if( t[0] == '2' && t[1] == '0' && t[2] < '5' )
+ if( t[0] < '2' || ( t[0] == '2' && t[1] == '0' && t[2] < '5' ) )
{
MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start,
(const unsigned char *) t + 2,