diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-29 13:17:29 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-04-03 15:45:38 +0200 |
commit | 8c69e467527c5ee484c9a921e9b5fd18c0c49b12 (patch) | |
tree | e4a847854881cd70a4234761ee96062456810e97 /trust/tests | |
parent | 91aa0f9623e232fa253308c4f7464dab8902dfea (diff) |
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
Diffstat (limited to 'trust/tests')
-rw-r--r-- | trust/tests/test-builder.c | 14 |
1 files changed, 1 insertions, 13 deletions
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); |