Project

General

Profile

Actions

Bug #18766

closed

ArgumentError with no backtrace information when requiring openssl/cipher and initializing an OpenSSL::Cipher

Added by postmodern (Hal Brodigan) almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
[ruby-core:108491]

Description

I discovered a mysterious ArgumentError when requiring 'openssl/cipher' instead of 'openssl' and initializing a OpenSSL::Cipher object. The ArgumentError does not indicate where the exception is being raised from.

Steps To Reproduce

ruby -r openssl/cipher -e "p OpenSSL::Cipher.new('aes-256-cbc')"

Expected Result

#<OpenSSL::Cipher:0x000055a5424cef68>

Actual Result

Traceback (most recent call last):
	2: from -e:1:in `<main>'
	1: from -e:1:in `new'
-e:1:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)

Effected Versions

Can reproduce this bug using ruby-2.7 and ruby-3.1.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0