diff options
author | Kazuki Yamaguchi <[email protected]> | 2020-02-19 05:11:54 +0000 |
---|---|---|
committer | Kazuki Yamaguchi <[email protected]> | 2021-03-16 19:16:10 +0900 |
commit | 10289e9f229dae499d8f9c4e8252aeb728117d28 (patch) | |
tree | 828613bdc0a6739b73924c08d2cdda447d9e176b /ext/openssl/ossl_x509ext.c | |
parent | 22aeb6373e13929e80da1676b1dc79cbfffc38a4 (diff) |
[ruby/openssl] config: replace DupConfigPtr() with GetConfig()
Now that OpenSSL::Config wraps a real CONF object, the caller can just
borrow it rather than creating a new temporary CONF object. CONF object
is usually treated as immutable.
DupConfigPtr() is now removed, and GetConfig() is exported instead.
https://github.com/ruby/openssl/commit/d9064190ca
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4275
Diffstat (limited to 'ext/openssl/ossl_x509ext.c')
-rw-r--r-- | ext/openssl/ossl_x509ext.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c index 5eb9bd759f..e54102c771 100644 --- a/ext/openssl/ossl_x509ext.c +++ b/ext/openssl/ossl_x509ext.c @@ -226,11 +226,10 @@ 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 : DupConfigPtr(rconf); + conf = NIL_P(rconf) ? NULL : GetConfig(rconf); X509V3_set_nconf(ctx, conf); ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING_PTR(valstr)); X509V3_set_ctx_nodb(ctx); - NCONF_free(conf); if (!ext){ ossl_raise(eX509ExtError, "%"PRIsVALUE" = %"PRIsVALUE, oid, valstr); } |