Skip to content

Commit 4139f18

Browse files
committed
Catch NoClassDefFoundError when attempting to load BouncyCastle
1 parent 2370f12 commit 4139f18

File tree

1 file changed

+2
-2
lines changed
  • webauthn-server-core/src/main/java/com/yubico/webauthn

1 file changed

+2
-2
lines changed

webauthn-server-core/src/main/java/com/yubico/webauthn/Crypto.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static KeyFactory getKeyFactory(String algorithm) throws NoSuchAlgorithmE
7979
log.debug("Caught {}. Attempting fallback to BouncyCastle...", e.toString());
8080
try {
8181
return KeyFactory.getInstance(algorithm, BouncyCastleLoader.getProvider());
82-
} catch (NoSuchAlgorithmException e2) {
82+
} catch (NoSuchAlgorithmException | NoClassDefFoundError e2) {
8383
throw e;
8484
}
8585
}
@@ -95,7 +95,7 @@ public static Signature getSignature(String algorithm) throws NoSuchAlgorithmExc
9595
log.debug("Caught {}. Attempting fallback to BouncyCastle...", e.toString());
9696
try {
9797
return Signature.getInstance(algorithm, BouncyCastleLoader.getProvider());
98-
} catch (NoSuchAlgorithmException e2) {
98+
} catch (NoSuchAlgorithmException | NoClassDefFoundError e2) {
9999
throw e;
100100
}
101101
}

0 commit comments

Comments
 (0)