2 * Copyright 1999-2022 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 /* Time tests for the asn1 module */
16 #include <crypto/asn1.h>
17 #include <openssl/asn1.h>
18 #include <openssl/evp.h>
19 #include <openssl/objects.h>
21 #include "internal/nelem.h"
24 char *data
; /* TIME string value */
25 int type
; /* GENERALIZED OR UTC */
26 int expected_type
; /* expected type after set/set_string_gmt */
27 int check_result
; /* check result */
28 time_t t
; /* expected time_t*/
29 int cmp_result
; /* comparison to baseline result */
30 int convert_result
; /* conversion result */
33 struct TESTDATA_asn1_to_utc
{
38 static const struct TESTDATA_asn1_to_utc asn1_to_utc
[] = {
41 * last second of standard time in central Europe in 2021
49 * first second of daylight saving time in central Europe in 2021
57 * last second of standard time in central Europe in 2021
58 * specified in offset to GMT
60 "20210328015959+0100",
65 * first second of daylight saving time in central Europe in 2021
66 * specified in offset to GMT
68 "20210328030000+0200",
73 * Invalid strings should get -1 as a result
80 static struct testdata tbl_testdata_pos
[] = {
81 { "0", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, }, /* Bad time */
82 { "ABCD", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
83 { "0ABCD", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
84 { "1-700101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
85 { "`9700101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
86 { "19700101000000Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 0, 0, 0, 0, },
87 { "A00101000000Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 0, 0, 0, 0, },
88 { "A9700101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
89 { "1A700101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
90 { "19A00101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
91 { "197A0101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
92 { "1970A101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
93 { "19700A01000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
94 { "197001A1000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
95 { "1970010A000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
96 { "19700101A00000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
97 { "197001010A0000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
98 { "1970010100A000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
99 { "19700101000A00Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
100 { "197001010000A0Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
101 { "1970010100000AZ", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
102 { "700101000000X", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 0, 0, 0, 0, },
103 { "19700101000000X", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 0, 0, 0, 0, },
104 { "19700101000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 0, -1, 1, }, /* Epoch begins */
105 { "700101000000Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 0, -1, 1, }, /* ditto */
106 { "20380119031407Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 0x7FFFFFFF, 1, 1, }, /* Max 32bit time_t */
107 { "380119031407Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 0x7FFFFFFF, 1, 1, },
108 { "20371231235959Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 2145916799, 1, 1, }, /* Just before 2038 */
109 { "20371231235959Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 0, 0, 0, 1, }, /* Bad UTC time */
110 { "371231235959Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 2145916799, 1, 1, },
111 { "19701006121456Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 24063296, -1, 1, },
112 { "701006121456Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 24063296, -1, 1, },
113 { "19991231000000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, }, /* Match baseline */
114 { "199912310000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, }, /* In various flavors */
115 { "991231000000Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
116 { "9912310000Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
117 { "9912310000+0000", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
118 { "199912310000+0000", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
119 { "9912310000-0000", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
120 { "199912310000-0000", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
121 { "199912310100+0100", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
122 { "199912302300-0100", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
123 { "199912302300-A000", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 0, 946598400, 0, 1, },
124 { "199912302300-0A00", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 0, 946598400, 0, 1, },
125 { "9912310100+0100", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
126 { "9912302300-0100", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, 946598400, 0, 1, },
129 /* ASSUMES SIGNED TIME_T */
130 static struct testdata tbl_testdata_neg
[] = {
131 { "19011213204552Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 1, INT_MIN
, -1, 0, },
132 { "691006121456Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, -7472704, -1, 1, },
133 { "19691006121456Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, -7472704, -1, 1, },
136 /* explicit casts to time_t short warnings on systems with 32-bit time_t */
137 static struct testdata tbl_testdata_pos_64bit
[] = {
138 { "20380119031408Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, (time_t)0x80000000, 1, 1, },
139 { "20380119031409Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_UTCTIME
, 1, (time_t)0x80000001, 1, 1, },
140 { "380119031408Z", V_ASN1_UTCTIME
, V_ASN1_UTCTIME
, 1, (time_t)0x80000000, 1, 1, },
141 { "20500101120000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 1, (time_t)0x967b1ec0, 1, 0, },
144 /* ASSUMES SIGNED TIME_T */
145 static struct testdata tbl_testdata_neg_64bit
[] = {
146 { "19011213204551Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 1, (time_t)-2147483649LL, -1, 0, },
147 { "19000101120000Z", V_ASN1_GENERALIZEDTIME
, V_ASN1_GENERALIZEDTIME
, 1, (time_t)-2208945600LL, -1, 0, },
150 /* A baseline time to compare to */
151 static ASN1_TIME gtime
= {
153 V_ASN1_GENERALIZEDTIME
,
154 (unsigned char*)"19991231000000Z",
157 static time_t gtime_t
= 946598400;
159 static int test_table(struct testdata
*tbl
, int idx
)
164 struct testdata
*td
= &tbl
[idx
];
167 atime
.data
= (unsigned char*)td
->data
;
168 atime
.length
= strlen((char*)atime
.data
);
169 atime
.type
= td
->type
;
172 if (!TEST_int_eq(ASN1_TIME_check(&atime
), td
->check_result
)) {
173 TEST_info("ASN1_TIME_check(%s) unexpected result", atime
.data
);
176 if (td
->check_result
== 0)
179 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(&atime
, td
->t
), 0)) {
180 TEST_info("ASN1_TIME_cmp_time_t(%s vs %ld) compare failed", atime
.data
, (long)td
->t
);
184 if (!TEST_true(ASN1_TIME_diff(&day
, &sec
, &atime
, &atime
))) {
185 TEST_info("ASN1_TIME_diff(%s) to self failed", atime
.data
);
188 if (!TEST_int_eq(day
, 0) || !TEST_int_eq(sec
, 0)) {
189 TEST_info("ASN1_TIME_diff(%s) to self not equal", atime
.data
);
193 if (!TEST_true(ASN1_TIME_diff(&day
, &sec
, >ime
, &atime
))) {
194 TEST_info("ASN1_TIME_diff(%s) to baseline failed", atime
.data
);
196 } else if (!((td
->cmp_result
== 0 && TEST_true((day
== 0 && sec
== 0))) ||
197 (td
->cmp_result
== -1 && TEST_true((day
< 0 || sec
< 0))) ||
198 (td
->cmp_result
== 1 && TEST_true((day
> 0 || sec
> 0))))) {
199 TEST_info("ASN1_TIME_diff(%s) to baseline bad comparison", atime
.data
);
203 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(&atime
, gtime_t
), td
->cmp_result
)) {
204 TEST_info("ASN1_TIME_cmp_time_t(%s) to baseline bad comparison", atime
.data
);
208 ptime
= ASN1_TIME_set(NULL
, td
->t
);
209 if (!TEST_ptr(ptime
)) {
210 TEST_info("ASN1_TIME_set(%ld) failed", (long)td
->t
);
214 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(ptime
, td
->t
), 0)) {
215 TEST_info("ASN1_TIME_set(%ld) compare failed (%s->%s)",
216 (long)td
->t
, td
->data
, ptime
->data
);
217 local_error
= error
= 1;
219 if (!TEST_int_eq(ptime
->type
, td
->expected_type
)) {
220 TEST_info("ASN1_TIME_set(%ld) unexpected type", (long)td
->t
);
221 local_error
= error
= 1;
224 TEST_info("ASN1_TIME_set() = %*s", ptime
->length
, ptime
->data
);
225 ASN1_TIME_free(ptime
);
228 ptime
= ASN1_TIME_new();
229 if (!TEST_ptr(ptime
)) {
230 TEST_info("ASN1_TIME_new() failed");
234 if (!TEST_int_eq(ASN1_TIME_set_string(ptime
, td
->data
), td
->check_result
)) {
235 TEST_info("ASN1_TIME_set_string_gmt(%s) failed", td
->data
);
236 local_error
= error
= 1;
238 if (!TEST_int_eq(ASN1_TIME_normalize(ptime
), td
->check_result
)) {
239 TEST_info("ASN1_TIME_normalize(%s) failed", td
->data
);
240 local_error
= error
= 1;
242 if (!TEST_int_eq(ptime
->type
, td
->expected_type
)) {
243 TEST_info("ASN1_TIME_set_string_gmt(%s) unexpected type", td
->data
);
244 local_error
= error
= 1;
247 if (!TEST_true(ASN1_TIME_diff(&day
, &sec
, ptime
, &atime
)) || !TEST_int_eq(day
, 0) || !TEST_int_eq(sec
, 0)) {
248 TEST_info("ASN1_TIME_diff(day=%d, sec=%d, %s) after ASN1_TIME_set_string_gmt() failed", day
, sec
, td
->data
);
249 local_error
= error
= 1;
251 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(ptime
, gtime_t
), td
->cmp_result
)) {
252 TEST_info("ASN1_TIME_cmp_time_t(%s) after ASN1_TIME_set_string_gnt() to baseline bad comparison", td
->data
);
253 local_error
= error
= 1;
256 TEST_info("ASN1_TIME_set_string_gmt() = %*s", ptime
->length
, ptime
->data
);
257 ASN1_TIME_free(ptime
);
260 ptime
= ASN1_TIME_new();
261 if (!TEST_ptr(ptime
)) {
262 TEST_info("ASN1_TIME_new() failed");
266 if (!TEST_int_eq(ASN1_TIME_set_string(ptime
, td
->data
), td
->check_result
)) {
267 TEST_info("ASN1_TIME_set_string(%s) failed", td
->data
);
268 local_error
= error
= 1;
271 if (!TEST_true(ASN1_TIME_diff(&day
, &sec
, ptime
, &atime
)) || !TEST_int_eq(day
, 0) || !TEST_int_eq(sec
, 0)) {
272 TEST_info("ASN1_TIME_diff(day=%d, sec=%d, %s) after ASN1_TIME_set_string() failed", day
, sec
, td
->data
);
273 local_error
= error
= 1;
275 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(ptime
, gtime_t
), td
->cmp_result
)) {
276 TEST_info("ASN1_TIME_cmp_time_t(%s) after ASN1_TIME_set_string() to baseline bad comparison", td
->data
);
277 local_error
= error
= 1;
280 TEST_info("ASN1_TIME_set_string() = %*s", ptime
->length
, ptime
->data
);
281 ASN1_TIME_free(ptime
);
284 if (td
->type
== V_ASN1_UTCTIME
) {
285 ptime
= ASN1_TIME_to_generalizedtime(&atime
, NULL
);
286 if (td
->convert_result
== 1 && !TEST_ptr(ptime
)) {
287 TEST_info("ASN1_TIME_to_generalizedtime(%s) failed", atime
.data
);
289 } else if (td
->convert_result
== 0 && !TEST_ptr_null(ptime
)) {
290 TEST_info("ASN1_TIME_to_generalizedtime(%s) should have failed", atime
.data
);
293 if (ptime
!= NULL
&& !TEST_int_eq(ASN1_TIME_cmp_time_t(ptime
, td
->t
), 0)) {
294 TEST_info("ASN1_TIME_to_generalizedtime(%s->%s) bad result", atime
.data
, ptime
->data
);
297 ASN1_TIME_free(ptime
);
299 /* else cannot simply convert GENERALIZEDTIME to UTCTIME */
302 TEST_error("atime=%s", atime
.data
);
307 static int test_table_pos(int idx
)
309 return test_table(tbl_testdata_pos
, idx
);
312 static int test_table_neg(int idx
)
314 return test_table(tbl_testdata_neg
, idx
);
317 static int test_table_pos_64bit(int idx
)
319 return test_table(tbl_testdata_pos_64bit
, idx
);
322 static int test_table_neg_64bit(int idx
)
324 return test_table(tbl_testdata_neg_64bit
, idx
);
327 struct compare_testdata
{
333 static unsigned char TODAY_GEN_STR
[] = "20170825000000Z";
334 static unsigned char TOMORROW_GEN_STR
[] = "20170826000000Z";
335 static unsigned char TODAY_UTC_STR
[] = "170825000000Z";
336 static unsigned char TOMORROW_UTC_STR
[] = "170826000000Z";
338 #define TODAY_GEN { sizeof(TODAY_GEN_STR)-1, V_ASN1_GENERALIZEDTIME, TODAY_GEN_STR, 0 }
339 #define TOMORROW_GEN { sizeof(TOMORROW_GEN_STR)-1, V_ASN1_GENERALIZEDTIME, TOMORROW_GEN_STR, 0 }
340 #define TODAY_UTC { sizeof(TODAY_UTC_STR)-1, V_ASN1_UTCTIME, TODAY_UTC_STR, 0 }
341 #define TOMORROW_UTC { sizeof(TOMORROW_UTC_STR)-1, V_ASN1_UTCTIME, TOMORROW_UTC_STR, 0 }
343 static struct compare_testdata tbl_compare_testdata
[] = {
344 { TODAY_GEN
, TODAY_GEN
, 0 },
345 { TODAY_GEN
, TODAY_UTC
, 0 },
346 { TODAY_GEN
, TOMORROW_GEN
, -1 },
347 { TODAY_GEN
, TOMORROW_UTC
, -1 },
349 { TODAY_UTC
, TODAY_GEN
, 0 },
350 { TODAY_UTC
, TODAY_UTC
, 0 },
351 { TODAY_UTC
, TOMORROW_GEN
, -1 },
352 { TODAY_UTC
, TOMORROW_UTC
, -1 },
354 { TOMORROW_GEN
, TODAY_GEN
, 1 },
355 { TOMORROW_GEN
, TODAY_UTC
, 1 },
356 { TOMORROW_GEN
, TOMORROW_GEN
, 0 },
357 { TOMORROW_GEN
, TOMORROW_UTC
, 0 },
359 { TOMORROW_UTC
, TODAY_GEN
, 1 },
360 { TOMORROW_UTC
, TODAY_UTC
, 1 },
361 { TOMORROW_UTC
, TOMORROW_GEN
, 0 },
362 { TOMORROW_UTC
, TOMORROW_UTC
, 0 }
365 static int test_table_compare(int idx
)
367 struct compare_testdata
*td
= &tbl_compare_testdata
[idx
];
369 return TEST_int_eq(ASN1_TIME_compare(&td
->t1
, &td
->t2
), td
->result
);
372 static int test_time_dup(void)
375 ASN1_TIME
*asn1_time
= NULL
;
376 ASN1_TIME
*asn1_time_dup
= NULL
;
377 ASN1_TIME
*asn1_gentime
= NULL
;
379 asn1_time
= ASN1_TIME_adj(NULL
, time(NULL
), 0, 0);
380 if (asn1_time
== NULL
) {
381 TEST_info("Internal error.");
385 asn1_gentime
= ASN1_TIME_to_generalizedtime(asn1_time
, NULL
);
386 if (asn1_gentime
== NULL
) {
387 TEST_info("Internal error.");
391 asn1_time_dup
= ASN1_TIME_dup(asn1_time
);
392 if (!TEST_ptr_ne(asn1_time_dup
, NULL
)) {
393 TEST_info("ASN1_TIME_dup() failed.");
396 if (!TEST_int_eq(ASN1_TIME_compare(asn1_time
, asn1_time_dup
), 0)) {
397 TEST_info("ASN1_TIME_dup() duplicated non-identical value.");
400 ASN1_STRING_free(asn1_time_dup
);
402 asn1_time_dup
= ASN1_UTCTIME_dup(asn1_time
);
403 if (!TEST_ptr_ne(asn1_time_dup
, NULL
)) {
404 TEST_info("ASN1_UTCTIME_dup() failed.");
407 if (!TEST_int_eq(ASN1_TIME_compare(asn1_time
, asn1_time_dup
), 0)) {
408 TEST_info("ASN1_UTCTIME_dup() duplicated non-identical UTCTIME value.");
411 ASN1_STRING_free(asn1_time_dup
);
413 asn1_time_dup
= ASN1_GENERALIZEDTIME_dup(asn1_gentime
);
414 if (!TEST_ptr_ne(asn1_time_dup
, NULL
)) {
415 TEST_info("ASN1_GENERALIZEDTIME_dup() failed.");
418 if (!TEST_int_eq(ASN1_TIME_compare(asn1_gentime
, asn1_time_dup
), 0)) {
419 TEST_info("ASN1_GENERALIZEDTIME_dup() dup'ed non-identical value.");
425 ASN1_STRING_free(asn1_time
);
426 ASN1_STRING_free(asn1_gentime
);
427 ASN1_STRING_free(asn1_time_dup
);
431 static int convert_asn1_to_time_t(int idx
)
435 testdateutc
= ossl_asn1_string_to_time_t(asn1_to_utc
[idx
].input
);
437 if (!TEST_time_t_eq(testdateutc
, asn1_to_utc
[idx
].expected
)) {
438 TEST_info("ossl_asn1_string_to_time_t (%s) failed: expected %lli, got %lli\n",
439 asn1_to_utc
[idx
].input
,
440 (long long int)asn1_to_utc
[idx
].expected
,
441 (long long int)testdateutc
);
448 * this test is here to exercise ossl_asn1_time_from_tm
449 * with an integer year close to INT_MAX.
451 static int convert_tm_to_asn1_time(void)
453 /* we need 64 bit time_t */
454 #if ((ULONG_MAX >> 31) >> 31) >= 1
458 if (sizeof(time_t) * CHAR_BIT
>= 64) {
459 t
= 67768011791126057ULL;
460 at
= ASN1_TIME_set(NULL
, t
);
462 * If ASN1_TIME_set returns NULL, it means it could not handle the input
463 * which is fine for this edge case.
465 ASN1_STRING_free(at
);
471 int setup_tests(void)
474 * On platforms where |time_t| is an unsigned integer, t will be a
477 * We check if we're on a platform with a signed |time_t| with '!(t > 0)'
478 * because some compilers are picky if you do 't < 0', or even 't <= 0'
479 * if |t| is unsigned.
483 * On some platforms, |time_t| is signed, but a negative value is an
484 * error, and using it with gmtime() or localtime() generates a NULL.
485 * If that is the case, we can't perform tests on negative values.
487 struct tm
*ptm
= localtime(&t
);
489 ADD_ALL_TESTS(test_table_pos
, OSSL_NELEM(tbl_testdata_pos
));
490 if (!(t
> 0) && ptm
!= NULL
) {
491 TEST_info("Adding negative-sign time_t tests");
492 ADD_ALL_TESTS(test_table_neg
, OSSL_NELEM(tbl_testdata_neg
));
494 if (sizeof(time_t) > sizeof(uint32_t)) {
495 TEST_info("Adding 64-bit time_t tests");
496 ADD_ALL_TESTS(test_table_pos_64bit
, OSSL_NELEM(tbl_testdata_pos_64bit
));
498 if (!(t
> 0) && ptm
!= NULL
) {
499 TEST_info("Adding negative-sign 64-bit time_t tests");
500 ADD_ALL_TESTS(test_table_neg_64bit
, OSSL_NELEM(tbl_testdata_neg_64bit
));
504 ADD_ALL_TESTS(test_table_compare
, OSSL_NELEM(tbl_compare_testdata
));
505 ADD_TEST(test_time_dup
);
506 ADD_ALL_TESTS(convert_asn1_to_time_t
, OSSL_NELEM(asn1_to_utc
));
507 ADD_TEST(convert_tm_to_asn1_time
);