From 76e933a5a517971327784ba7edc993f727ed0b35 Mon Sep 17 00:00:00 2001 From: rhe Date: Thu, 19 May 2016 04:53:05 +0000 Subject: openssl: register ex_data index for X509_STORE{_CTX,} respectively * ext/openssl/ossl.c (Init_openssl): register an ex_data index for X509_STORE and X509_STORE_CTX respectively. Since they don't share the ex_data index registry, we can't use the same index. (ossl_verify_cb): use the the correct index. * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. (ossl_x509stctx_verify): ditto. * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations of ossl_store_{ctx_,}ex_verify_cb_idx. * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and X509_STORE_get_ex_data. * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/openssl/ossl.h') diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index a31ca951..5b2f6e11 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -171,7 +171,8 @@ void ossl_clear_error(void); /* * Verify callback */ -extern int ossl_verify_cb_idx; +extern int ossl_store_ctx_ex_verify_cb_idx; +extern int ossl_store_ex_verify_cb_idx; struct ossl_verify_cb_args { VALUE proc; -- cgit v1.2.3