summaryrefslogtreecommitdiff
path: root/test/time_offset_test.c
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2017-08-04 11:24:03 +1000
committerPauli <paul.dale@oracle.com>2017-08-04 11:24:03 +1000
commitcf37aaa335965902c6a022bc3c3e0162f59c0f3a (patch)
treeb00a60fd9a70836f4d97478432cd4d9ddaae73fa /test/time_offset_test.c
parent2326bba0e5cbe98f4d00855a6909b1f14b6f5427 (diff)
downloadopenssl-new-cf37aaa335965902c6a022bc3c3e0162f59c0f3a.tar.gz
Consolidate to a single asn1_time_from_tm() function
Add missing ASN1_TIME functions Do some cleanup of the ASN1_TIME code. Add ASN1_TIME_normalize() to normalize ASN1_TIME structures. Add ASN1_TIME_compare() to compare two ASN1_TIME structures. Add ASN1_TIME_cmp_time_t() to compare an ASN1_TIME to time_t (generic version of ASN1_UTCTIME_cmp_time_t()). Replace '0' .. '9' compares with isdigit() Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2753)
Diffstat (limited to 'test/time_offset_test.c')
-rw-r--r--test/time_offset_test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/time_offset_test.c b/test/time_offset_test.c
index 3560f4cef5..b7f1e87367 100644
--- a/test/time_offset_test.c
+++ b/test/time_offset_test.c
@@ -96,10 +96,7 @@ static int test_offset(int idx)
return 0;
}
- if (at.type == V_ASN1_UTCTIME)
- ret = ASN1_UTCTIME_cmp_time_t(&at, the_time);
- else
- return 1; /* no other cmp_time_t() functions available, yet */
+ ret = ASN1_TIME_cmp_time_t(&at, the_time);
if (!TEST_int_eq(testdata->time_result, ret)) {
TEST_info("ASN1_UTCTIME_cmp_time_t() test failed for %s\n", at.data);