public final class PemReader extends Object
| Modifier and Type | Method and Description |
|---|---|
static KeyStore |
loadKeyStore(File certificateChainFile,
File privateKeyFile,
Optional<String> keyPassword) |
static PrivateKey |
loadPrivateKey(File privateKeyFile,
Optional<String> keyPassword) |
static PrivateKey |
loadPrivateKey(String privateKey,
Optional<String> keyPassword) |
static KeyStore |
loadTrustStore(File certificateChainFile) |
static List<X509Certificate> |
readCertificateChain(File certificateChainFile) |
static List<X509Certificate> |
readCertificateChain(String certificateChain) |
public static KeyStore loadTrustStore(File certificateChainFile) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic static KeyStore loadKeyStore(File certificateChainFile, File privateKeyFile, Optional<String> keyPassword) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic static List<X509Certificate> readCertificateChain(File certificateChainFile) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic static List<X509Certificate> readCertificateChain(String certificateChain) throws CertificateException
CertificateExceptionpublic static PrivateKey loadPrivateKey(File privateKeyFile, Optional<String> keyPassword) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic static PrivateKey loadPrivateKey(String privateKey, Optional<String> keyPassword) throws KeyStoreException, IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException
Copyright © 2010–2018 Airlift. All rights reserved.