Use UTC to heck certificate validity

This commit is contained in:
Paul Bakker 2014-07-08 14:39:41 +02:00
parent dedce0c35c
commit f48de9579f
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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, &lt );
gmtime_r( &tt, &lt );
now->year = lt.tm_year + 1900;
now->mon = lt.tm_mon + 1;