Skip to content

Commit dc5bbbc

Browse files
committed
ssl: remove unreachable code
GetSSLCTX() never returns NULL.
1 parent f3b596e commit dc5bbbc

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

ext/openssl/ossl_ssl.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -996,12 +996,7 @@ ossl_sslctx_get_ciphers(VALUE self)
996996
int i, num;
997997

998998
GetSSLCTX(self, ctx);
999-
if(!ctx){
1000-
rb_warning("SSL_CTX is not initialized.");
1001-
return Qnil;
1002-
}
1003999
ciphers = SSL_CTX_get_ciphers(ctx);
1004-
10051000
if (!ciphers)
10061001
return rb_ary_new();
10071002

@@ -1049,10 +1044,6 @@ ossl_sslctx_set_ciphers(VALUE self, VALUE v)
10491044
}
10501045

10511046
GetSSLCTX(self, ctx);
1052-
if(!ctx){
1053-
ossl_raise(eSSLError, "SSL_CTX is not initialized.");
1054-
return Qnil;
1055-
}
10561047
if (!SSL_CTX_set_cipher_list(ctx, StringValueCStr(str))) {
10571048
ossl_raise(eSSLError, "SSL_CTX_set_cipher_list");
10581049
}

0 commit comments

Comments
 (0)