mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
fix asn1test on windows
This commit is contained in:
@@ -143,7 +143,7 @@ int GMSSL_gmtime_adj(struct tm *tm, long offset_sec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//convert generalizedtime to tm
|
//convert generalizedtime to tm
|
||||||
int asn1_generalizedtime_to_tm(struct tm *tm, char *gtime)
|
int asn1_generalizedtime_to_tm(char *gtime,struct tm *tm)
|
||||||
{
|
{
|
||||||
static const int min[9] = { 0, 0, 1, 1, 0, 0, 0, 0, 0 };
|
static const int min[9] = { 0, 0, 1, 1, 0, 0, 0, 0, 0 };
|
||||||
static const int max[9] = { 99, 99, 12, 31, 23, 59, 59, 12, 59 };
|
static const int max[9] = { 99, 99, 12, 31, 23, 59, 59, 12, 59 };
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ extern "C" {
|
|||||||
int GMSSL_gmtime(const time_t *timep, struct tm *tm_time);
|
int GMSSL_gmtime(const time_t *timep, struct tm *tm_time);
|
||||||
time_t GMSSL_timegm(struct tm *tm);
|
time_t GMSSL_timegm(struct tm *tm);
|
||||||
int GMSSL_gmtime_adj(struct tm *tm, long offset_sec);
|
int GMSSL_gmtime_adj(struct tm *tm, long offset_sec);
|
||||||
int asn1_generalizedtime_to_tm(struct tm *tm,char *gtime);
|
int asn1_generalizedtime_to_tm(char *gtime,struct tm *tm);
|
||||||
int asn1_utctime_to_tm(struct tm *tm, char *utime);
|
int asn1_utctime_to_tm(struct tm *tm, char *utime);
|
||||||
int asn1_tm_to_generalizedtime(struct tm *tm, char *gtime);
|
int asn1_tm_to_generalizedtime(struct tm *tm, char *gtime);
|
||||||
int asn1_tm_to_utctime(struct tm *tm, char *utime);
|
int asn1_tm_to_utctime(struct tm *tm, char *utime);
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ int main(void)
|
|||||||
if (test_asn1_utf8_string() != 1) goto err;
|
if (test_asn1_utf8_string() != 1) goto err;
|
||||||
if (test_asn1_ia5_string() != 1) goto err;
|
if (test_asn1_ia5_string() != 1) goto err;
|
||||||
if (test_asn1_utc_time() != 1) goto err;
|
if (test_asn1_utc_time() != 1) goto err;
|
||||||
//if (test_asn1_generalized_time() != 1) goto err;
|
if (test_asn1_generalized_time() != 1) goto err;
|
||||||
printf("%s all tests passed\n", __FILE__);
|
printf("%s all tests passed\n", __FILE__);
|
||||||
return 0;
|
return 0;
|
||||||
err:
|
err:
|
||||||
|
|||||||
Reference in New Issue
Block a user