修改证书起始时间,时区问题

This commit is contained in:
fengweihao
2019-07-23 19:33:06 +08:00
parent 298d799e0a
commit c63d557536

View File

@@ -616,8 +616,6 @@ int ssl_x509_serial_copyrand(X509 * dstcrt, X509 * srccrt)
return 0; return 0;
} }
static time_t ASN1_GetTimeT(ASN1_TIME* time){ static time_t ASN1_GetTimeT(ASN1_TIME* time){
struct tm t; struct tm t;
const char* str = (const char*) time->data; const char* str = (const char*) time->data;
@@ -649,6 +647,7 @@ static time_t ASN1_GetTimeT(ASN1_TIME* time){
t.tm_sec += (str[i++] - '0'); t.tm_sec += (str[i++] - '0');
/* Note: we did not adjust the time based on time zone information */ /* Note: we did not adjust the time based on time zone information */
setenv("TZ", "UTC", 1);
return mktime(&t); return mktime(&t);
} }