Class BouncyCastlePemReader

java.lang.Object
io.netty.handler.ssl.BouncyCastlePemReader

final class BouncyCastlePemReader extends Object
  • Field Details

    • BC_PROVIDER

      private static final String BC_PROVIDER
      See Also:
    • BC_PEMPARSER

      private static final String BC_PEMPARSER
      See Also:
    • logger

      private static final InternalLogger logger
    • unavailabilityCause

      private static volatile Throwable unavailabilityCause
    • bcProvider

      private static volatile Provider bcProvider
    • attemptedLoading

      private static volatile boolean attemptedLoading
  • Constructor Details

    • BouncyCastlePemReader

      private BouncyCastlePemReader()
  • Method Details

    • hasAttemptedLoading

      public static boolean hasAttemptedLoading()
    • isAvailable

      public static boolean isAvailable()
    • unavailabilityCause

      public static Throwable unavailabilityCause()
      Returns:
      the cause if unavailable. null if available.
    • tryLoading

      private static void tryLoading()
    • getPrivateKey

      public static PrivateKey getPrivateKey(InputStream keyInputStream, String keyPassword)
      Generates a new PrivateKey.
      Parameters:
      keyInputStream - an input stream for a PKCS#1 or PKCS#8 private key in PEM format.
      keyPassword - the password of the keyFile. null if it's not password-protected.
      Returns:
      generated PrivateKey.
    • getPrivateKey

      public static PrivateKey getPrivateKey(File keyFile, String keyPassword)
      Generates a new PrivateKey.
      Parameters:
      keyFile - a PKCS#1 or PKCS#8 private key file in PEM format.
      keyPassword - the password of the keyFile. null if it's not password-protected.
      Returns:
      generated PrivateKey.
    • newConverter

      private static org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter newConverter()
    • getPrivateKey

      private static PrivateKey getPrivateKey(org.bouncycastle.openssl.PEMParser pemParser, String keyPassword) throws IOException, org.bouncycastle.pkcs.PKCSException, org.bouncycastle.operator.OperatorCreationException
      Throws:
      IOException
      org.bouncycastle.pkcs.PKCSException
      org.bouncycastle.operator.OperatorCreationException
    • newParser

      private static org.bouncycastle.openssl.PEMParser newParser(File keyFile) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • newParser

      private static org.bouncycastle.openssl.PEMParser newParser(InputStream keyInputStream)