aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ts.c
diff options
context:
space:
mode:
authorMartin Bosslet <Martin.Bosslet@gmail.com>2018-06-21 09:51:01 -0600
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-10-01 11:25:06 +1300
commitf201e3282ec0f93cb6e199dfbed4e80c0f57714b (patch)
tree41c4fe6fedde422476843a5d62186153dd376dc6 /ext/openssl/ossl_ts.c
parentc7e404520b52255772d60706ce77373c928db4a8 (diff)
downloadruby-openssl-f201e3282ec0f93cb6e199dfbed4e80c0f57714b.tar.gz
ts: Timestamp support (3/3)
This commit applies the third patches (tsr3.tar.gz) from https://bugs.ruby-lang.org/issues/4183
Diffstat (limited to 'ext/openssl/ossl_ts.c')
-rwxr-xr-xext/openssl/ossl_ts.c6
1 files changed, 3 insertions, 3 deletions
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);