Commit e306e53
committed
Handle BC-FIPS related exception and propagate exception causes
When testing with BC-FIPS PEMEncodeable was failing in some unexpected
ways.
in the first if we could not convert due to a PKCSException or InvalidKeySpecException
then the cause was logged and a new exception without details was thrown.
This means the underlying cause is lost when using any exception in a
FormValidation.
In the second case when using a key that had too short of salt an
org.bouncycastle.crypto.fips.FipsUnapprovedOperationError was thrown
which being an error would ripple up and cause an unexpected error.
We now catch this error and wrap it in an UnrecoverableKeyException so
it can be handled by the caller1 parent e1089fe commit e306e53
1 file changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
248 | | - | |
249 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
255 | 265 | | |
256 | 266 | | |
257 | 267 | | |
| |||
0 commit comments