0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00

deps: update mbedTLS to 2.28.4

We're specifically interested in the fix for the unit tests.
("Update test data to avoid failures of unit tests after
2023-08-07")

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
This commit is contained in:
Frank Lichtenheld 2023-08-23 11:56:01 +02:00
parent b755783a13
commit 1fa0e9589f
2 changed files with 17 additions and 22 deletions

4
deps/lib-versions vendored
View File

@ -4,8 +4,8 @@ export ASIO_CSUM=cbcaaba0f66722787b1a7c33afe1befb3a012b5af3ad7da7ff0f6b8c9b7a8a5
export LZ4_VERSION=lz4-1.8.3 export LZ4_VERSION=lz4-1.8.3
export LZ4_CSUM=33af5936ac06536805f9745e0b6d61da606a1f8b4cc5c04dd3cbaca3b9b4fc43 export LZ4_CSUM=33af5936ac06536805f9745e0b6d61da606a1f8b4cc5c04dd3cbaca3b9b4fc43
export MBEDTLS_VERSION=mbedtls-2.28.2 export MBEDTLS_VERSION=mbedtls-2.28.4
export MBEDTLS_CSUM=bc55232bf71fd66045122ba9050a29ea7cb2e8f99b064a9e6334a82f715881a0 export MBEDTLS_CSUM=578c4dcd15bbff3f5cd56aa07cd4f850fc733634e3d5947be4f7157d5bfd81ac
export JSONCPP_VERSION=1.8.4 export JSONCPP_VERSION=1.8.4
export JSONCPP_CSUM=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6 export JSONCPP_CSUM=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6

View File

@ -12,39 +12,34 @@ diff --git a/library/x509.c b/library/x509.c
index 264c7fb0c..9372bcb92 100644 index 264c7fb0c..9372bcb92 100644
--- a/library/x509.c --- a/library/x509.c
+++ b/library/x509.c +++ b/library/x509.c
@@ -556,13 +556,20 @@ static int x509_parse_time( unsigned char **p, size_t len, size_t yearlen, @@ -624,11 +624,16 @@ static int x509_parse_time(unsigned char
/* /*
* Parse seconds if present * Parse seconds if present
*/ */
- if ( len >= 2 ) - if (len >= 2) {
+ if ( len >= 2 && **p >= '0' && **p <= '9' ) + if (len >= 2 && **p >= '0' && **p <= '9') {
{ CHECK(x509_parse_int(p, 2, &tm->sec));
CHECK( x509_parse_int( p, 2, &tm->sec ) );
len -= 2; len -= 2;
} } else {
else
+ {
+#if defined(MBEDTLS_RELAXED_X509_DATE) +#if defined(MBEDTLS_RELAXED_X509_DATE)
+ /* if relaxed mode, allow seconds to be absent */ + /* if relaxed mode, allow seconds to be absent */
+ tm->sec = 0; + tm->sec = 0;
+#else +#else
return ( MBEDTLS_ERR_X509_INVALID_DATE ); return MBEDTLS_ERR_X509_INVALID_DATE;
+#endif +#endif
+ } }
/* /*
* Parse trailing 'Z' if present @@ -638,6 +643,14 @@ static int x509_parse_time(unsigned char
@@ -572,6 +579,15 @@ static int x509_parse_time( unsigned char **p, size_t len, size_t yearlen,
(*p)++; (*p)++;
len--; len--;
} }
+#if defined(MBEDTLS_RELAXED_X509_DATE) +#if defined(MBEDTLS_RELAXED_X509_DATE)
+ else if ( len == 5 && **p == '+' ) + else if ( len == 5 && **p == '+' ) {
+ { + int tz; /* throwaway timezone */
+ int tz; /* throwaway timezone */ + (*p)++;
+ (*p)++; + CHECK( x509_parse_int( p, 4, &tz ) );
+ CHECK( x509_parse_int( p, 4, &tz ) ); + return 0;
+ return 0;
+ } + }
+#endif +#endif