1

I've got the following code:

require 'openssl'
OpenSSL::Cipher.new("AES-256-CFB").authenticated?

No matter the algorithm I pass in (any of the types returned from OpenSSL::Cipher.ciphers) I get the followin exception:

NotImplementedError (authenticated?() function is unimplemented on this machine

Setup:

OS X (El Capitan) 10.11.3

ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]

Any help resolving this would be appreciated. I have confirmed on *nix and non-El-Capitan machines that this works.

dnstevenson
  • 697
  • 7
  • 16
  • Are you sure you're using Ruby 2.0? It looks like `OpenSSL::Cipher#authenticated?` was added in Ruby 2.0. What do you get for `RUBY_VERSION`? – Jordan Running Mar 18 '16 at 21:58
  • Yes: ruby -v ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15] $ irb irb(main):001:0> RUBY_VERSION => "2.0.0" – dnstevenson Mar 18 '16 at 21:59
  • What version of OpenSSL? (`OpenSSL::OPENSSL_VERSION`) You may need to upgrade your OpenSSL. – Jordan Running Mar 18 '16 at 22:06
  • OpenSSL 0.9.8zc 19 Mar 2015 – dnstevenson Mar 19 '16 at 18:25
  • Yeah, you should try upgrading OpenSSL. The answer here describes how you can do it with Homebrew: http://stackoverflow.com/questions/22993541/how-can-i-ensure-that-ruby-uses-an-openssl-not-vulnerable-to-heartbleed – Jordan Running Mar 19 '16 at 18:42

0 Answers0