summaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ssl.c
diff options
context:
space:
mode:
authornahi <nahi@ruby-lang.org>2011-06-22 09:24:31 +0000
committernahi <nahi@ruby-lang.org>2011-06-22 09:24:31 +0000
commitb2cf284d7a6ae04bf0e48a466bea2be0502eb050 (patch)
treef2a8517b16362983e4f633e0b29f7150b1bf3f17 /ext/openssl/ossl_ssl.c
parent855f38757e7d5bab36ed984b96010f75bc8bfa2a (diff)
downloadruby-openssl-history-b2cf284d7a6ae04bf0e48a466bea2be0502eb050.tar.gz
* ext/openssl/ossl_ssl.c (ossl_sslctx_session_remove_cb):
OpenSSL::SSL::SSLContext#session_remove_cb was broken. It wrongly tried to call the session_*new*_cb callback. * test/openssl/test_ssl_session.rb (class OpenSSL): Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ssl.c')
-rw-r--r--ext/openssl/ossl_ssl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 112077a..fd7b9f5 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -406,7 +406,6 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess)
return RTEST(ret_obj) ? 1 : 0;
}
-#if 0 /* unused */
static VALUE
ossl_call_session_remove_cb(VALUE ary)
{
@@ -420,7 +419,6 @@ ossl_call_session_remove_cb(VALUE ary)
return rb_funcall(cb, rb_intern("call"), 1, ary);
}
-#endif
static void
ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
@@ -442,7 +440,7 @@ ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
rb_ary_push(ary, sslctx_obj);
rb_ary_push(ary, sess_obj);
- ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_new_cb, ary, &state);
+ ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_remove_cb, ary, &state);
if (state) {
/*
the SSL_CTX is frozen, nowhere to save state.