From 0317d82f2d4527292d269e2be1370a360bd41616 Mon Sep 17 00:00:00 2001 From: Jan Dusil <134381434+jandusil@users.noreply.github.com> Date: Fri, 31 May 2024 07:40:40 +0200 Subject: [PATCH] Fix #610: Throwable and Error should not be caught (#611) --- .../security/powerauth/crypto/lib/util/EciesUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/EciesUtils.java b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/EciesUtils.java index d1087cca3..b9c15dd1f 100644 --- a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/EciesUtils.java +++ b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/EciesUtils.java @@ -109,8 +109,8 @@ public static byte[] deriveSharedInfo2Base(EncryptorScope scope, String applicat } try { return new HMACHashUtilities().hash(transportKey, applicationSecretBytes); - } catch (Throwable t) { - throw new EciesException("HMAC calculation failed", t); + } catch (Exception e) { + throw new EciesException("HMAC calculation failed", e); } } }