Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cipher.reset differs from MRI (raises error) when cipher.key is unset #5776

Open
shibz opened this issue Jun 27, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@shibz
Copy link

commented Jun 27, 2019

Environment

  • Reproduced in:
    • jruby 9.2.8.0-SNAPSHOT (2.5.3) 2019-06-24 5bc9b15 OpenJDK 64-Bit Server VM 25.201-b09 on 1.8.0_201-b09 +jit [linux-x86_64]
    • jruby 9.1.14.0 (2.3.3) 2017-11-08 2176f24 OpenJDK 64-Bit Server VM 25.212-b03 on 1.8.0_212-b03 +jit [linux-x86_64]
  • Linux 4.14.114-105.126.amzn2.x86_64 #1 SMP Tue May 7 02:26:40 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Expected Behavior

Tested in MRI Ruby 2.5 (ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux])

require 'openssl'
cipher = OpenSSL::Cipher.new("AES-128-CBC")
cipher.reset
# success, no error is raised

Actual Behavior

require 'openssl'
cipher = OpenSSL::Cipher.new("AES-128-CBC")
cipher.reset
# raises error:
OpenSSL::Cipher::CipherError: key not specified
from org/jruby/ext/openssl/Cipher.java:944:in `reset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.