Skip to content

Commit ced9f4b

Browse files
committed
JCE: catch WolfCryptException, throw new UnrecoverableKeyException
1 parent 70999de commit ced9f4b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/com/wolfssl/provider/jce/WolfSSLKeyStore.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,8 @@ else if (entry instanceof WKSSecretKey) {
11861186
sKey = new SecretKeySpec(plainKey, sk.keyAlgo);
11871187
}
11881188

1189+
} catch (WolfCryptException wce) {
1190+
throw new UnrecoverableKeyException("Error getting key: " + wce);
11891191
} finally {
11901192
if (plainKey != null) {
11911193
Arrays.fill(plainKey, (byte)0);

0 commit comments

Comments
 (0)