aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2020-08-08 19:28:11 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-03-16 19:16:11 +0900
commit08c99a4208af1a50e0ee2446ad4bb235edea00e5 (patch)
treecbd439c668af83bfcbcf18304b02dbab0a963482 /ext
parent88b8b3ac15223d65cf4b40cfc7d193b54b6e2f09 (diff)
downloadruby-08c99a4208af1a50e0ee2446ad4bb235edea00e5.tar.gz
[ruby/openssl] x509store: emit warning if arguments are given to X509::Store.new
Anything passed to OpenSSL::X509::Store.new was always ignored. Let's emit an explicit warning to not confuse users. https://github.com/ruby/openssl/commit/d173700eeb
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl_x509store.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c
index f7c73d01e8..d29e6f5e42 100644
--- a/ext/openssl/ossl_x509store.c
+++ b/ext/openssl/ossl_x509store.c
@@ -192,8 +192,9 @@ ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
{
X509_STORE *store;
-/* BUG: This method takes any number of arguments but appears to ignore them. */
GetX509Store(self, store);
+ if (argc != 0)
+ rb_warn("OpenSSL::X509::Store.new does not take any arguments");
#if !defined(HAVE_OPAQUE_OPENSSL)
/* [Bug #405] [Bug #1678] [Bug #3000]; already fixed? */
store->ex_data.sk = NULL;