mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 55074: [Backport #12868]
* 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/branches/ruby_2_3@56565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
564082796a
commit
93bceb14a4
8 changed files with 43 additions and 27 deletions
|
@ -133,11 +133,16 @@ int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in);
|
|||
#endif
|
||||
|
||||
#if !defined(HAVE_X509_STORE_GET_EX_DATA)
|
||||
void *X509_STORE_get_ex_data(X509_STORE *str, int idx);
|
||||
# define X509_STORE_get_ex_data(x, idx) \
|
||||
CRYPTO_get_ex_data(&(x)->ex_data, (idx))
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_X509_STORE_SET_EX_DATA)
|
||||
int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data);
|
||||
# define X509_STORE_set_ex_data(x, idx, data) \
|
||||
CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))
|
||||
# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \
|
||||
(newf), (dupf), (freef))
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_X509_CRL_SET_VERSION)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue