Use UTC to heck certificate validity

This commit is contained in:
Manuel Pégourié-Gonnard 2014-04-11 12:25:45 +02:00 committed by Paul Bakker
parent 52c5af7d2d
commit 0776a43788
2 changed files with 3 additions and 2 deletions

View file

@ -627,7 +627,7 @@ static void x509_get_current_time( x509_time *now )
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
SYSTEMTIME st;
GetLocalTime(&st);
GetSystemTime(&st);
now->year = st.wYear;
now->mon = st.wMonth;
@ -640,7 +640,7 @@ static void x509_get_current_time( x509_time *now )
time_t tt;
tt = time( NULL );
localtime_r( &tt, &lt );
gmtime_r( &tt, &lt );
now->year = lt.tm_year + 1900;
now->mon = lt.tm_mon + 1;