修改证书起始时间,时区问题
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user