Class BouncyCastleUtil

java.lang.Object
io.netty.handler.ssl.util.BouncyCastleUtil

public final class BouncyCastleUtil extends Object
Contains methods that can be used to detect if BouncyCastle is available.
  • Field Details

  • 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.
    • unavailabilityCauseBcProv

      public static Throwable unavailabilityCauseBcProv()
      Returns:
      the cause if unavailable. null if available.
    • unavailabilityCauseBcPkix

      public static Throwable unavailabilityCauseBcPkix()
      Returns:
      the cause if unavailable. null if available.
    • unavailabilityCauseBcTls

      public static Throwable unavailabilityCauseBcTls()
      Returns:
      the cause if unavailable. null if available.
    • isBcJsseInUse

      public static boolean isBcJsseInUse(SSLEngine engine)
      Indicates whether the given SSLEngine is implemented by BouncyCastle.
    • getBcProviderJce

      public static Provider getBcProviderJce()
      Get the BouncyCastle Java Crypto Extensions provider, or throw an exception if it is unavailable.
    • getBcProviderJsse

      public static Provider getBcProviderJsse()
      Get the BouncyCastle Java Secure Socket Extensions provider, or throw an exception if it is unavailable.
    • getBcSSLEngineClass

      public static Class<? extends SSLEngine> getBcSSLEngineClass()
      Returns the public SSLEngine sub-class that is used by bouncy-castle or null if it can't be loaded.
      Returns:
      engine class.
    • 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()