diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2020-08-08 19:28:11 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2020-08-12 18:12:30 +0900 |
commit | d173700eebafffb9a77ab1b5753b65551d830069 (patch) | |
tree | 537e3f07905a006e3b3ecf059ddb3a5ea00967ea /ext/openssl | |
parent | fb2fcbb13734056fa286b86c6f39d08bb80a0167 (diff) | |
download | ruby-openssl-d173700eebafffb9a77ab1b5753b65551d830069.tar.gz |
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.
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/ossl_x509store.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c index f7c73d01..d29e6f5e 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; |