From 8c69e467527c5ee484c9a921e9b5fd18c0c49b12 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 29 Mar 2013 13:17:29 +0100 Subject: Don't respect timezones for CKA_START_DATE or CKA_END_DATE The PKCS#11 specification does not note what timezone these dates are in. In addition the time values are not represented in PKCS#11. So don't reinterpret certificate dates, other than filling in the century for dates that have a two digit year. Lastly, these are low resolution optional fields so not being all strict about timezones here is appropriate. https://bugs.freedesktop.org/show_bug.cgi?id=62825 --- trust/tests/test-builder.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'trust/tests') diff --git a/trust/tests/test-builder.c b/trust/tests/test-builder.c index 7cab1f6..a875b96 100644 --- a/trust/tests/test-builder.c +++ b/trust/tests/test-builder.c @@ -552,7 +552,7 @@ test_build_distant_end_date (CuTest *cu) }; CK_ATTRIBUTE expected[] = { - { CKA_END_DATE, }, + { CKA_END_DATE, "20671229", 8 }, { CKA_START_DATE, "20130327", 8 }, { CKA_INVALID }, }; @@ -562,18 +562,6 @@ test_build_distant_end_date (CuTest *cu) setup (cu); - /* - * On a 32-bit system, the end date will be too big to compute with - * libc. So it'll be empty, since this is an optional field. - */ - if (sizeof (time_t) <= 4) { - expected[0].pValue = ""; - expected[0].ulValueLen = 0; - } else { - expected[0].pValue = "20671229"; - expected[0].ulValueLen = 8; - } - attrs = NULL; rv = p11_builder_build (test.builder, test.index, &attrs, p11_attrs_dup (input)); CuAssertIntEquals (cu, CKR_OK, rv); -- cgit v1.1