Skip to content

Commit

Permalink
ssl: remove unreachable code
Browse files Browse the repository at this point in the history
GetSSLCTX() never returns NULL.
  • Loading branch information
rhenium committed Dec 8, 2017
1 parent f3b596e commit dc5bbbc
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ext/openssl/ossl_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit dc5bbbc

Please sign in to comment.