mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-19 11:08:00 +00:00
Use UTC to heck certificate validity
This commit is contained in:
parent
dedce0c35c
commit
f48de9579f
|
@ -10,6 +10,7 @@ Changes
|
||||||
* Work around a bug of the version of Clang shipped by Apple with Mavericks
|
* Work around a bug of the version of Clang shipped by Apple with Mavericks
|
||||||
that prevented bignum.c from compiling. (Reported by Rafael Baptista.)
|
that prevented bignum.c from compiling. (Reported by Rafael Baptista.)
|
||||||
* Improvements to tests/Makefile, contributed by Oden Eriksson.
|
* Improvements to tests/Makefile, contributed by Oden Eriksson.
|
||||||
|
* Use UTC time to check certificate validity.
|
||||||
|
|
||||||
Security
|
Security
|
||||||
* Forbid change of server certificate during renegotiation to prevent
|
* Forbid change of server certificate during renegotiation to prevent
|
||||||
|
|
|
@ -3083,7 +3083,7 @@ static void x509_get_current_time( x509_time *now )
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
SYSTEMTIME st;
|
SYSTEMTIME st;
|
||||||
|
|
||||||
GetLocalTime(&st);
|
GetSystemTime(&st);
|
||||||
|
|
||||||
now->year = st.wYear;
|
now->year = st.wYear;
|
||||||
now->mon = st.wMonth;
|
now->mon = st.wMonth;
|
||||||
|
@ -3096,7 +3096,7 @@ static void x509_get_current_time( x509_time *now )
|
||||||
time_t tt;
|
time_t tt;
|
||||||
|
|
||||||
tt = time( NULL );
|
tt = time( NULL );
|
||||||
localtime_r( &tt, < );
|
gmtime_r( &tt, < );
|
||||||
|
|
||||||
now->year = lt.tm_year + 1900;
|
now->year = lt.tm_year + 1900;
|
||||||
now->mon = lt.tm_mon + 1;
|
now->mon = lt.tm_mon + 1;
|
||||||
|
|
Loading…
Reference in a new issue