diff --git a/core/java/src/net/i2p/crypto/SigType.java b/core/java/src/net/i2p/crypto/SigType.java index 7b808a9e8b418d27c813e868b449b52b230e9ced..fb1ed7658b0fcbf05703a8ac3670ab7faa1bf9e4 100644 --- a/core/java/src/net/i2p/crypto/SigType.java +++ b/core/java/src/net/i2p/crypto/SigType.java @@ -95,6 +95,7 @@ public enum SigType { private final SigAlgo base; private final String digestName, algoName, since; private final AlgorithmParameterSpec params; + private final boolean isAvail; SigType(int cod, int pubLen, int privLen, int hLen, int sLen, SigAlgo baseAlgo, String mdName, String aName, AlgorithmParameterSpec pSpec, String supportedSince) { @@ -108,6 +109,7 @@ public enum SigType { algoName = aName; params = pSpec; since = supportedSince; + isAvail = x_isAvailable(); } /** the unique identifier for this type */ @@ -180,6 +182,10 @@ public enum SigType { * @return true if supported in this JVM */ public boolean isAvailable() { + return isAvail; + } + + private boolean x_isAvailable() { if (DSA_SHA1 == this) return true; try {