Consolidate to a single asn1_time_from_tm() function
[openssl.git] / test / time_offset_test.c
index 6660aee5dcbc761245846b8f180c5fc641dbe496..b7f1e87367a6e2a0783fb27a3266a9894b78bdef 100644 (file)
@@ -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);
@@ -109,7 +106,8 @@ static int test_offset(int idx)
     return 1;
 }
 
-void register_tests()
+int setup_tests()
 {
     ADD_ALL_TESTS(test_offset, OSSL_NELEM(tests));
+    return 1;
 }