mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-12 07:07:58 +02:00
Use UTC to heck certificate validity
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user