projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move curve448_test.c to be a full internal test
[openssl.git]
/
test
/
time_offset_test.c
diff --git
a/test/time_offset_test.c
b/test/time_offset_test.c
index 7b4bec92c560bdb17e8f3178917a187272748a0d..f3b20dd2426eb4ec5fdb04b14c35cba9979cfba2 100644
(file)
--- a/
test/time_offset_test.c
+++ b/
test/time_offset_test.c
@@
-16,7
+16,7
@@
#include <openssl/asn1.h>
#include <openssl/x509.h>
#include "testutil.h"
#include <openssl/asn1.h>
#include <openssl/x509.h>
#include "testutil.h"
-#include "
e_os
.h"
+#include "
internal/nelem
.h"
typedef struct {
const char *data;
typedef struct {
const char *data;
@@
-74,6
+74,7
@@
static int test_offset(int idx)
at.data = (unsigned char*)testdata->data;
at.length = strlen(testdata->data);
at.type = testdata->type;
at.data = (unsigned char*)testdata->data;
at.length = strlen(testdata->data);
at.type = testdata->type;
+ at.flags = 0;
if (!TEST_true(ASN1_TIME_diff(&day, &sec, &the_asn1_time, &at))) {
TEST_info("ASN1_TIME_diff() failed for %s\n", at.data);
if (!TEST_true(ASN1_TIME_diff(&day, &sec, &the_asn1_time, &at))) {
TEST_info("ASN1_TIME_diff() failed for %s\n", at.data);
@@
-95,10
+96,7
@@
static int test_offset(int idx)
return 0;
}
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);
if (!TEST_int_eq(testdata->time_result, ret)) {
TEST_info("ASN1_UTCTIME_cmp_time_t() test failed for %s\n", at.data);
@@
-108,7
+106,8
@@
static int test_offset(int idx)
return 1;
}
return 1;
}
-
void register
_tests()
+
int setup
_tests()
{
ADD_ALL_TESTS(test_offset, OSSL_NELEM(tests));
{
ADD_ALL_TESTS(test_offset, OSSL_NELEM(tests));
+ return 1;
}
}