Top Fields Constructors Methods
io.netty.handler.ssl

pack-priv final Class BouncyCastlePemReader

extends Object
Class Inheritance
Imports
io.netty.util.CharsetUtil, io.netty.util.internal.logging.InternalLogger, .InternalLoggerFactory, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.openssl.PEMDecryptorProvider, .PEMEncryptedKeyPair, .PEMKeyPair, .PEMParser, org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter, .JceOpenSSLPKCS8DecryptorProviderBuilder, .JcePEMDecryptorProviderBuilder, org.bouncycastle.operator.InputDecryptorProvider, .OperatorCreationException, org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo, .PKCSException, java.io.File, .FileNotFoundException, .FileReader, .IOException, .InputStream, .InputStreamReader, java.security.AccessController, .PrivateKey, .PrivilegedAction, .Provider

Field Summary

Modifier and TypeField and Description
private static volatile boolean
private static final String
private static final String
private static volatile Provider
private static final InternalLogger
private static volatile Throwable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PrivateKey

Returns:

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

Generates a new PrivateKey.

public static PrivateKey

Returns:

generated PrivateKey.
getPrivateKey
(File
a PKCS#1 or PKCS#8 private key file in PEM format.
keyFile
,
String
the password of the keyFile. null if it's not password-protected.
keyPassword
)

Generates a new PrivateKey.

private static PrivateKey
getPrivateKey(PEMParser pemParser, String keyPassword)

public static boolean
public static boolean
private static JcaPEMKeyConverter
private static PEMParser
newParser(File keyFile)

private static PEMParser
newParser(InputStream keyInputStream)

private static void
public static Throwable

Returns:

the cause if unavailable. null if available.
unavailabilityCause
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attemptedLoadingback to summary
private static volatile boolean attemptedLoading
BC_PEMPARSERback to summary
private static final String BC_PEMPARSER
BC_PROVIDERback to summary
private static final String BC_PROVIDER
bcProviderback to summary
private static volatile Provider bcProvider
loggerback to summary
private static final InternalLogger logger
unavailabilityCauseback to summary
private static volatile Throwable unavailabilityCause

Constructor Detail

BouncyCastlePemReaderback to summary
private BouncyCastlePemReader()

Method Detail

getPrivateKeyback to summary
public static PrivateKey getPrivateKey(InputStream keyInputStream, String keyPassword)

Generates a new PrivateKey.

Parameters
keyInputStream:InputStream

an input stream for a PKCS#1 or PKCS#8 private key in PEM format.

keyPassword:String

the password of the keyFile. null if it's not password-protected.

Returns:PrivateKey

generated PrivateKey.

getPrivateKeyback to summary
public static PrivateKey getPrivateKey(File keyFile, String keyPassword)

Generates a new PrivateKey.

Parameters
keyFile:File

a PKCS#1 or PKCS#8 private key file in PEM format.

keyPassword:String

the password of the keyFile. null if it's not password-protected.

Returns:PrivateKey

generated PrivateKey.

getPrivateKeyback to summary
private static PrivateKey getPrivateKey(PEMParser pemParser, String keyPassword) throws IOException, PKCSException, OperatorCreationException
hasAttemptedLoadingback to summary
public static boolean hasAttemptedLoading()
isAvailableback to summary
public static boolean isAvailable()
newConverterback to summary
private static JcaPEMKeyConverter newConverter()
newParserback to summary
private static PEMParser newParser(File keyFile) throws FileNotFoundException
newParserback to summary
private static PEMParser newParser(InputStream keyInputStream)
tryLoadingback to summary
private static void tryLoading()
unavailabilityCauseback to summary
public static Throwable unavailabilityCause()
Returns:Throwable

the cause if unavailable. null if available.