summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl_pkey.c4
-rw-r--r--ext/openssl/ossl_pkey_dh.c3
-rw-r--r--ext/openssl/ossl_pkey_dsa.c3
-rw-r--r--ext/openssl/ossl_pkey_rsa.c3
-rw-r--r--ext/openssl/ossl_ssl.c12
5 files changed, 14 insertions, 11 deletions
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
index e07e659319..cb0c320a0c 100644
--- a/ext/openssl/ossl_pkey.c
+++ b/ext/openssl/ossl_pkey.c
@@ -38,7 +38,7 @@ ossl_generate_cb(int p, int n, void *arg)
int
ossl_generate_cb_2(int p, int n, BN_GENCB *cb)
{
- VALUE ary, ret;
+ VALUE ary;
struct ossl_generate_cb_arg *arg;
int state;
@@ -51,7 +51,7 @@ ossl_generate_cb_2(int p, int n, BN_GENCB *cb)
/*
* can be break by raising exception or 'break'
*/
- ret = rb_protect(rb_yield, ary, &state);
+ rb_protect(rb_yield, ary, &state);
if (state) {
arg->stop = 1;
arg->state = state;
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c
index 7f62db48d8..819fbced42 100644
--- a/ext/openssl/ossl_pkey_dh.c
+++ b/ext/openssl/ossl_pkey_dh.c
@@ -90,11 +90,12 @@ struct dh_blocking_gen_arg {
int result;
};
-static void
+static VALUE
dh_blocking_gen(void *arg)
{
struct dh_blocking_gen_arg *gen = (struct dh_blocking_gen_arg *)arg;
gen->result = DH_generate_parameters_ex(gen->dh, gen->size, gen->gen, gen->cb);
+ return Qnil;
}
#endif
diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c
index 3339c1dfc6..e6a44deb0a 100644
--- a/ext/openssl/ossl_pkey_dsa.c
+++ b/ext/openssl/ossl_pkey_dsa.c
@@ -87,11 +87,12 @@ struct dsa_blocking_gen_arg {
int result;
};
-static void
+static VALUE
dsa_blocking_gen(void *arg)
{
struct dsa_blocking_gen_arg *gen = (struct dsa_blocking_gen_arg *)arg;
gen->result = DSA_generate_parameters_ex(gen->dsa, gen->size, gen->seed, gen->seed_len, gen->counter, gen->h, gen->cb);
+ return Qnil;
}
#endif
diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c
index d6ae8d22bb..1e28b4fb2b 100644
--- a/ext/openssl/ossl_pkey_rsa.c
+++ b/ext/openssl/ossl_pkey_rsa.c
@@ -85,11 +85,12 @@ struct rsa_blocking_gen_arg {
int result;
};
-static void
+static VALUE
rsa_blocking_gen(void *arg)
{
struct rsa_blocking_gen_arg *gen = (struct rsa_blocking_gen_arg *)arg;
gen->result = RSA_generate_key_ex(gen->rsa, gen->size, gen->e, gen->cb);
+ return Qnil;
}
#endif
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 3769633468..eb04a612c9 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -380,7 +380,7 @@ ossl_call_session_new_cb(VALUE ary)
static int
ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess)
{
- VALUE ary, ssl_obj, sess_obj, ret_obj;
+ VALUE ary, ssl_obj, sess_obj;
void *ptr;
int state = 0;
@@ -397,7 +397,7 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess)
rb_ary_push(ary, ssl_obj);
rb_ary_push(ary, sess_obj);
- ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_new_cb, ary, &state);
+ rb_protect((VALUE(*)_((VALUE)))ossl_call_session_new_cb, ary, &state);
if (state) {
rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(state));
}
@@ -429,7 +429,7 @@ ossl_call_session_remove_cb(VALUE ary)
static void
ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
{
- VALUE ary, sslctx_obj, sess_obj, ret_obj;
+ VALUE ary, sslctx_obj, sess_obj;
void *ptr;
int state = 0;
@@ -446,7 +446,7 @@ ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
rb_ary_push(ary, sslctx_obj);
rb_ary_push(ary, sess_obj);
- ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_remove_cb, ary, &state);
+ rb_protect((VALUE(*)_((VALUE)))ossl_call_session_remove_cb, ary, &state);
if (state) {
/*
the SSL_CTX is frozen, nowhere to save state.
@@ -506,7 +506,7 @@ ossl_call_servername_cb(VALUE ary)
static int
ssl_servername_cb(SSL *ssl, int *ad, void *arg)
{
- VALUE ary, ssl_obj, ret_obj;
+ VALUE ary, ssl_obj;
void *ptr;
int state = 0;
const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
@@ -521,7 +521,7 @@ ssl_servername_cb(SSL *ssl, int *ad, void *arg)
rb_ary_push(ary, ssl_obj);
rb_ary_push(ary, rb_str_new2(servername));
- ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_servername_cb, ary, &state);
+ rb_protect((VALUE(*)_((VALUE)))ossl_call_servername_cb, ary, &state);
if (state) {
rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(state));
return SSL_TLSEXT_ERR_ALERT_FATAL;