From f201e3282ec0f93cb6e199dfbed4e80c0f57714b Mon Sep 17 00:00:00 2001 From: Martin Bosslet Date: Thu, 21 Jun 2018 09:51:01 -0600 Subject: ts: Timestamp support (3/3) This commit applies the third patches (tsr3.tar.gz) from https://bugs.ruby-lang.org/issues/4183 --- ext/openssl/ossl_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/openssl/ossl_ts.c') diff --git a/ext/openssl/ossl_ts.c b/ext/openssl/ossl_ts.c index e7f380e0..fbb4ee1d 100755 --- a/ext/openssl/ossl_ts.c +++ b/ext/openssl/ossl_ts.c @@ -941,7 +941,7 @@ static void int_ossl_init_roots(VALUE roots, X509_STORE * store) STACK_OF(X509_INFO) *inf; X509_INFO *itmp; BIO *in; - int i, count = 0; + int i; if (roots == Qnil) { ossl_raise(rb_eTypeError, "roots must not be nil."); @@ -968,7 +968,6 @@ static void int_ossl_init_roots(VALUE roots, X509_STORE * store) itmp = sk_X509_INFO_value(inf, i); if (itmp->x509) { X509_STORE_add_cert(store, itmp->x509); - count++; } /* ignore CRLs deliberately */ } @@ -1053,8 +1052,9 @@ ossl_ts_verify(int argc, VALUE *argv, VALUE self) } if (!(ctx->store = X509_STORE_new())) { + TS_VERIFY_CTX_free(ctx); ossl_raise(eTimestampError, NULL); - goto end; + return Qnil; } int_ossl_init_roots(roots, ctx->store); -- cgit v1.2.3