Commit cf64431
authored
Fix: Rescue OpenSSL::Cipher::CipherError for unsupported cipher algorithms (#39)
## 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.1 parent f25bc2a commit cf64431
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments