diff options
author | Rich Salz <rsalz@openssl.org> | 2017-01-10 16:18:33 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-01-12 09:54:09 -0500 |
commit | 329f2f4a428b0acb7a579869a13f6cd6bf0a3551 (patch) | |
tree | 21b1720cfe4d65f717c91c79de567843cd722ed0 /test | |
parent | 65c1f979ee9346d63bb6e81f25bb7dffda99b342 (diff) |
GH2176: Add X509_VERIFY_PARAM_get_time
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2208)
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 d95f0608e3..11585eaeaa 100644 --- a/test/crltest.c +++ b/test/crltest.c @@ -19,6 +19,8 @@ #include "testutil.h" #include "test_main.h" +#define PARAM_TIME 1474934400 /* Sep 27th, 2016 */ + static const char *kCRLTestRoot[] = { "-----BEGIN CERTIFICATE-----\n", "MIIDbzCCAlegAwIBAgIJAODri7v0dDUFMA0GCSqGSIb3DQEBCwUAME4xCzAJBgNV\n", @@ -253,7 +255,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); |