From 3e8ae1212262373de202c5303c320070debc062d Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 5 Jul 2017 22:17:42 +0900 Subject: ssl: remove a needless NULL check in SSL::SSLContext#ciphers --- ext/openssl/ossl_ssl.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'ext/openssl') diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index ae03c164..b8367c84 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -970,12 +970,7 @@ ossl_sslctx_get_ciphers(VALUE self) int i, num; GetSSLCTX(self, ctx); - if(!ctx){ - rb_warning("SSL_CTX is not initialized."); - return Qnil; - } ciphers = SSL_CTX_get_ciphers(ctx); - if (!ciphers) return rb_ary_new(); -- cgit v1.2.3