fix asn1test on windows

This commit is contained in:
toorls
2022-10-12 06:05:55 -07:00
parent e25f8b945e
commit f23c89f0b7
3 changed files with 3 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ int GMSSL_gmtime_adj(struct tm *tm, long offset_sec)
}
//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 max[9] = { 99, 99, 12, 31, 23, 59, 59, 12, 59 };

View File

@@ -15,7 +15,7 @@ extern "C" {
int GMSSL_gmtime(const time_t *timep, struct tm *tm_time);
time_t GMSSL_timegm(struct tm *tm);
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_tm_to_generalizedtime(struct tm *tm, char *gtime);
int asn1_tm_to_utctime(struct tm *tm, char *utime);

View File

@@ -589,7 +589,7 @@ int main(void)
if (test_asn1_utf8_string() != 1) goto err;
if (test_asn1_ia5_string() != 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__);
return 0;
err: