summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_config.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 08:37:55 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 08:37:55 +0000
commit6f7b5ffe6f5f33d841e4f8d58214b685023118fa (patch)
tree0dbfd9d03c66e975a2d8753ec007af91c3025dd4 /ext/openssl/ossl_config.c
parenta909ff22c8086e695ac010aa9f36723ce6674097 (diff)
* ext/openssl/ossl_config.c: OpenSSL 1.0.0 support.
* ext/openssl/extconf.rb: check some functions added/removed at OpenSSL 1.0.0. * ext/openssl/ossl_engine.c (ossl_engine_s_load): use engines which exists. * ext/openssl/ossl_ssl_session (SSL_SESSION_cmp): removed at 1.0.0, so implement compatible fuction here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_config.c')
-rw-r--r--ext/openssl/ossl_config.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/ext/openssl/ossl_config.c b/ext/openssl/ossl_config.c
index aae3b94..91faacf 100644
--- a/ext/openssl/ossl_config.c
+++ b/ext/openssl/ossl_config.c
@@ -314,13 +314,14 @@ ossl_config_get_section_old(VALUE self, VALUE section)
#ifdef IMPLEMENT_LHASH_DOALL_ARG_FN
static void
-get_conf_section(CONF_VALUE *cv, VALUE ary)
+get_conf_section_doall_arg(CONF_VALUE *cv, void *tmp)
{
+ VALUE ary = (VALUE)tmp;
if(cv->name) return;
rb_ary_push(ary, rb_str_new2(cv->section));
}
-static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE*, VALUE)
+static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE, void)
static VALUE
ossl_config_get_sections(VALUE self)
@@ -330,14 +331,16 @@ ossl_config_get_sections(VALUE self)
GetConfig(self, conf);
ary = rb_ary_new();
- lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(get_conf_section), (void*)ary);
+ lh_doall_arg((_LHASH *)conf->data, LHASH_DOALL_ARG_FN(get_conf_section),
+ (void*)ary);
return ary;
}
static void
-dump_conf_value(CONF_VALUE *cv, VALUE str)
+dump_conf_value_doall_arg(CONF_VALUE *cv, void *tmp)
{
+ VALUE str = (VALUE)tmp;
STACK_OF(CONF_VALUE) *sk;
CONF_VALUE *v;
int i, num;
@@ -358,7 +361,7 @@ dump_conf_value(CONF_VALUE *cv, VALUE str)
rb_str_cat2(str, "\n");
}
-static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE*, VALUE)
+static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE, void)
static VALUE
dump_conf(CONF *conf)
@@ -366,7 +369,8 @@ dump_conf(CONF *conf)
VALUE str;
str = rb_str_new(0, 0);
- lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(dump_conf_value), (void*)str);
+ lh_doall_arg((_LHASH *)conf->data, LHASH_DOALL_ARG_FN(dump_conf_value),
+ (void*)str);
return str;
}
@@ -382,7 +386,7 @@ ossl_config_to_s(VALUE self)
}
static void
-each_conf_value(CONF_VALUE *cv, void* dummy)
+each_conf_value_doall_arg(CONF_VALUE *cv, void *dummy)
{
STACK_OF(CONF_VALUE) *sk;
CONF_VALUE *v;
@@ -402,7 +406,7 @@ each_conf_value(CONF_VALUE *cv, void* dummy)
}
}
-static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE*, void*)
+static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE, void *)
static VALUE
ossl_config_each(VALUE self)
@@ -412,7 +416,8 @@ ossl_config_each(VALUE self)
RETURN_ENUMERATOR(self, 0, 0);
GetConfig(self, conf);
- lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(each_conf_value), (void*)NULL);
+ lh_doall_arg((_LHASH *)conf->data, LHASH_DOALL_ARG_FN(each_conf_value),
+ (void*)NULL);
return self;
}