diff options
author | Rich Salz <rsalz@openssl.org> | 2017-01-10 16:18:33 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-01-12 10:08:24 -0500 |
commit | ff7256e75928be74101f3ce2d1fbf62f7e10a1f3 (patch) | |
tree | 45ae068f27531142bacb806b4f7d313131503220 /test | |
parent | d257b86caadb4f6cb2ca723b75452e0fc8c8bb15 (diff) |
GH2176: Add X509_VERIFY_PARAM_get_time
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2208)
(cherry picked from commit 329f2f4a428b0acb7a579869a13f6cd6bf0a3551)
Diffstat (limited to 'test')
-rw-r--r-- | test/crltest.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/crltest.c b/test/crltest.c index ddcc7853f6..74db9444cd 100644 --- a/test/crltest.c +++ b/test/crltest.c @@ -18,6 +18,8 @@ #include "testutil.h" +#define PARAM_TIME 1474934400 /* Sep 27th, 2016 */ + static const char *kCRLTestRoot[] = { "-----BEGIN CERTIFICATE-----\n", "MIIDbzCCAlegAwIBAgIJAODri7v0dDUFMA0GCSqGSIb3DQEBCwUAME4xCzAJBgNV\n", @@ -252,7 +254,11 @@ static int verify(X509 *leaf, X509 *root, STACK_OF(X509_CRL) *crls, goto err; X509_STORE_CTX_set0_trusted_stack(ctx, roots); X509_STORE_CTX_set0_crls(ctx, crls); - X509_VERIFY_PARAM_set_time(param, 1474934400 /* Sep 27th, 2016 */); + X509_VERIFY_PARAM_set_time(param, PARAM_TIME); + if (X509_VERIFY_PARAM_get_time(param) != PARAM_TIME) { + fprintf(stderr, "set_time/get_time mismatch.\n"); + goto err; + } X509_VERIFY_PARAM_set_depth(param, 16); if (flags) X509_VERIFY_PARAM_set_flags(param, flags); |