diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-12-08 14:17:17 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-12-08 14:33:27 +0900 |
commit | dc5bbbc5f0892d37bf947339997e10917992038f (patch) | |
tree | 55253c02f6a49e1a31a85e6eb816a197f33729fb | |
parent | f3b596e858ea1604d0ea5653bffe80672c22f079 (diff) | |
download | ruby-openssl-dc5bbbc5f0892d37bf947339997e10917992038f.tar.gz |
ssl: remove unreachable code
GetSSLCTX() never returns NULL.
-rw-r--r-- | ext/openssl/ossl_ssl.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 736f4924..c6bfb831 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -996,12 +996,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(); @@ -1049,10 +1044,6 @@ ossl_sslctx_set_ciphers(VALUE self, VALUE v) } GetSSLCTX(self, ctx); - if(!ctx){ - ossl_raise(eSSLError, "SSL_CTX is not initialized."); - return Qnil; - } if (!SSL_CTX_set_cipher_list(ctx, StringValueCStr(str))) { ossl_raise(eSSLError, "SSL_CTX_set_cipher_list"); } |