From d8af9c854d4c6723afb4a3295b8a21bdce8cc06e Mon Sep 17 00:00:00 2001 From: nahi Date: Wed, 22 Jun 2011 09:24:31 +0000 Subject: * 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 --- ext/openssl/ossl_ssl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 112077ac7f..fd7b9f5e44 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. -- cgit v1.2.3