Class BouncyCastleUtil
java.lang.Object
io.netty.handler.ssl.util.BouncyCastleUtil
Contains methods that can be used to detect if BouncyCastle is available.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static Providerprivate static Providerprivate static final InternalLoggerprivate static Throwableprivate static Throwableprivate static Throwable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidstatic ProviderGet the BouncyCastle Java Crypto Extensions provider, or throw an exception if it is unavailable.static ProviderGet the BouncyCastle Java Secure Socket Extensions provider, or throw an exception if it is unavailable.Returns the publicSSLEnginesub-class that is used by bouncy-castle ornullif it can't be loaded.static booleanisBcJsseInUse(SSLEngine engine) Indicates whether the given SSLEngine is implemented by BouncyCastle.static booleanIndicate whether the BouncyCastle Public-Key Infrastructure utilities are available.static booleanIndicate whether the BouncyCastle Java Crypto Extensions provider is available.static booleanIndicate whether the BouncyCastle Java Secure Socket Extensions provider is available.(package private) static voidreset()Reset the loaded providers.private static voidstatic Throwablestatic Throwablestatic Throwable
-
Field Details
-
logger
-
BC_PROVIDER_NAME
- See Also:
-
BC_PROVIDER
- See Also:
-
BC_FIPS_PROVIDER_NAME
- See Also:
-
BC_FIPS_PROVIDER
- See Also:
-
BC_JSSE_PROVIDER_NAME
- See Also:
-
BC_JSSE_PROVIDER
- See Also:
-
BC_PEMPARSER
- See Also:
-
BC_JSSE_SSLENGINE
- See Also:
-
BC_JSSE_ALPN_SELECTOR
- See Also:
-
bcProviderJce
-
bcProviderJsse
-
bcSSLEngineClass
-
attemptedLoading
private static volatile boolean attemptedLoading
-
-
Constructor Details
-
BouncyCastleUtil
private BouncyCastleUtil()
-
-
Method Details
-
isBcProvAvailable
public static boolean isBcProvAvailable()Indicate whether the BouncyCastle Java Crypto Extensions provider is available. -
isBcPkixAvailable
public static boolean isBcPkixAvailable()Indicate whether the BouncyCastle Public-Key Infrastructure utilities are available. -
isBcTlsAvailable
public static boolean isBcTlsAvailable()Indicate whether the BouncyCastle Java Secure Socket Extensions provider is available. -
isBcJsseInUse
Indicates whether the given SSLEngine is implemented by BouncyCastle. -
getBcProviderJce
Get the BouncyCastle Java Crypto Extensions provider, or throw an exception if it is unavailable. -
getBcProviderJsse
Get the BouncyCastle Java Secure Socket Extensions provider, or throw an exception if it is unavailable. -
getBcSSLEngineClass
-
reset
static void reset()Reset the loaded providers. Useful for testing, to redo the loading under different conditions. -
ensureLoaded
private static void ensureLoaded() -
tryLoading
private static void tryLoading()
-