mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-07 21:53:41 +08:00
fix asn1 time bug on windows
This commit is contained in:
@@ -1193,7 +1193,7 @@ int asn1_utc_time_from_der_ex(int tag, time_t *t, const uint8_t **pin, size_t *p
|
|||||||
}
|
}
|
||||||
if (len == sizeof("YYMMDDHHMMSSZ")-1) {
|
if (len == sizeof("YYMMDDHHMMSSZ")-1) {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
asn1_generalizedtime_to_tm(&tm_val, buf);
|
asn1_generalizedtime_to_tm(buf, &tm_val);
|
||||||
*t = GMSSL_timegm(&tm_val);
|
*t = GMSSL_timegm(&tm_val);
|
||||||
#else
|
#else
|
||||||
if (!strptime(buf, "%Y%m%d%H%M%SZ", &tm_val)) {
|
if (!strptime(buf, "%Y%m%d%H%M%SZ", &tm_val)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user