File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
prov/src/main/java/org/bouncycastle/jcajce/provider/keystore/pkcs12 Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -672,9 +672,13 @@ else if (algorithm.equals(PKCSObjectIdentifiers.id_PBES2))
672672 return (PrivateKey )cipher .unwrap (data , "" , Cipher .PRIVATE_KEY );
673673 }
674674 }
675+ catch (InvalidKeyException e )
676+ {
677+ throw Exceptions .ioException ("exception unwrapping private key:" + e .getMessage (), new UnrecoverableKeyException (e .toString ()));
678+ }
675679 catch (Exception e )
676680 {
677- throw new IOException ("exception unwrapping private key - " + e .toString () );
681+ throw Exceptions . ioException ("exception unwrapping private key: " + e .getMessage (), e );
678682 }
679683
680684 throw new IOException ("exception unwrapping private key - cannot recognise: " + algorithm );
You can’t perform that action at this time.
0 commit comments