Skip to content

Conversation

@ydah
Copy link

@ydah ydah commented Jan 29, 2026

Summary

Fix error handling in JWE::Enc::Cipher.for to properly catch unsupported cipher errors.

Problem

When an unsupported cipher algorithm is used, newer versions of OpenSSL raise OpenSSL::Cipher::CipherError instead of RuntimeError. This caused 6 test failures because the expected JWE::NotImplementedError was not being raised.

Solution

Added OpenSSL::Cipher::CipherError to the rescue clause alongside the existing RuntimeError to handle both cases.

…ithms

## Summary

Fix error handling in `JWE::Enc::Cipher.for` to properly catch unsupported cipher errors.

## Problem

When an unsupported cipher algorithm is used, newer versions of OpenSSL raise `OpenSSL::Cipher::CipherError` instead of `RuntimeError`. This caused 6 test failures because the expected `JWE::NotImplementedError` was not being raised.

## Solution

Added `OpenSSL::Cipher::CipherError` to the rescue clause alongside the existing `RuntimeError` to handle both cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant