aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-12 10:08:21 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-21 00:46:34 +0900
commit483c2aa207fd3a3fec48b0647b17a7e2aeb96810 (patch)
tree24424be776ec64a3a43e07e16eda1df153a137f1
parent5c383cc72f9dc9af81dbe713814495e868a102d4 (diff)
downloadruby-483c2aa207fd3a3fec48b0647b17a7e2aeb96810.tar.gz
use new (will be in 1.1.0-pre5) SSL_CTX_get_ciphers()
-rw-r--r--ext/openssl/ossl_ssl.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 6156a64caf..66549fae1f 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -895,7 +895,6 @@ static VALUE
ossl_sslctx_get_ciphers(VALUE self)
{
SSL_CTX *ctx;
- SSL *temp_ssl;
STACK_OF(SSL_CIPHER) *ciphers;
const SSL_CIPHER *cipher;
VALUE ary;
@@ -906,14 +905,8 @@ ossl_sslctx_get_ciphers(VALUE self)
rb_warning("SSL_CTX is not initialized.");
return Qnil;
}
- /* SSL_CTX was made opaque so we can't access ctx->cipher_list directly :( */
- temp_ssl = SSL_new(ctx);
- if (!temp_ssl)
- ossl_raise(eSSLError, "SSL_new() failed");
-
- ciphers = SSL_get_ciphers(temp_ssl);
- SSL_free(temp_ssl);
+ ciphers = SSL_CTX_get_ciphers(ctx);
if (!ciphers)
return rb_ary_new();