diff --git a/lib/jwe/enc/cipher.rb b/lib/jwe/enc/cipher.rb index 5c35e4f..0fced31 100644 --- a/lib/jwe/enc/cipher.rb +++ b/lib/jwe/enc/cipher.rb @@ -7,7 +7,7 @@ module Cipher class << self def for(cipher_name) OpenSSL::Cipher.new(cipher_name) - rescue RuntimeError + rescue RuntimeError, OpenSSL::Cipher::CipherError raise JWE::NotImplementedError.new("The version of OpenSSL linked to your Ruby does not support the cipher #{cipher_name}.") end end