aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_x509ext.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-08-03 21:13:23 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-08-14 21:24:27 +0900
commit03ef996e342678fe4fff7484929f6dbb4021305d (patch)
tree7c4546a89001daf864bf51d30f5187f02b98e349 /ext/openssl/ossl_x509ext.c
parent3a2840e80d275895523a526ce56e4f6e7b8f9cc4 (diff)
downloadruby-openssl-03ef996e342678fe4fff7484929f6dbb4021305d.tar.gz
config: rename GetConfigPtr() to DupConfigPtr()
Make it follow the convention. Other Get*Ptr() functions return a pointer to OpenSSL object that the caller doesn't need to free. Indeed DupConfigPtr() is not the best name (OpenSSL::Config does not actually wrap a CONF object), but should be better than GetConfigPtr().
Diffstat (limited to 'ext/openssl/ossl_x509ext.c')
-rw-r--r--ext/openssl/ossl_x509ext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index 021cc8ab..b4098859 100644
--- a/ext/openssl/ossl_x509ext.c
+++ b/ext/openssl/ossl_x509ext.c
@@ -196,7 +196,7 @@ ossl_x509extfactory_set_config(VALUE self, VALUE config)
GetX509ExtFactory(self, ctx);
rb_iv_set(self, "@config", config);
- conf = GetConfigPtr(config); /* NO DUP NEEDED */
+ conf = DupConfigPtr(config);
X509V3_set_nconf(ctx, conf);
return config;
@@ -257,7 +257,7 @@ ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self)
GetX509ExtFactory(self, ctx);
obj = NewX509Ext(cX509Ext);
rconf = rb_iv_get(self, "@config");
- conf = NIL_P(rconf) ? NULL : GetConfigPtr(rconf);
+ conf = NIL_P(rconf) ? NULL : DupConfigPtr(rconf);
ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING_PTR(valstr));
if (!ext){
ossl_raise(eX509ExtError, "%"PRIsVALUE" = %"PRIsVALUE, oid, valstr);