From 03ef996e342678fe4fff7484929f6dbb4021305d Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 3 Aug 2016 21:13:23 +0900 Subject: 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(). --- ext/openssl/ossl_x509ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/openssl/ossl_x509ext.c') 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); -- cgit v1.2.3