mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-23 20:20:59 +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
|
||||
that prevented bignum.c from compiling. (Reported by Rafael Baptista.)
|
||||
* Improvements to tests/Makefile, contributed by Oden Eriksson.
|
||||
* Use UTC time to check certificate validity.
|
||||
|
||||
Security
|
||||
* 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)
|
||||
SYSTEMTIME st;
|
||||
|
||||
GetLocalTime(&st);
|
||||
GetSystemTime(&st);
|
||||
|
||||
now->year = st.wYear;
|
||||
now->mon = st.wMonth;
|
||||
|
@ -3096,7 +3096,7 @@ static void x509_get_current_time( x509_time *now )
|
|||
time_t tt;
|
||||
|
||||
tt = time( NULL );
|
||||
localtime_r( &tt, < );
|
||||
gmtime_r( &tt, < );
|
||||
|
||||
now->year = lt.tm_year + 1900;
|
||||
now->mon = lt.tm_mon + 1;
|
||||
|
|
Loading…
Reference in a new issue