public final class PemReader extends Object
com.google.common.io.Files.asCharSource
has been removed.java.nio.file.Files
has been added.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 PublicKey |
loadPublicKey(File publicKeyFile) |
static PublicKey |
loadPublicKey(String publicKey) |
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
IOException
GeneralSecurityException
public static KeyStore loadKeyStore(File certificateChainFile, File privateKeyFile, Optional<String> keyPassword) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public static List<X509Certificate> readCertificateChain(File certificateChainFile) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public static List<X509Certificate> readCertificateChain(String certificateChain) throws CertificateException
CertificateException
public static PrivateKey loadPrivateKey(File privateKeyFile, Optional<String> keyPassword) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public static PrivateKey loadPrivateKey(String privateKey, Optional<String> keyPassword) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public static PublicKey loadPublicKey(File publicKeyFile) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public static PublicKey loadPublicKey(String publicKey) throws GeneralSecurityException
GeneralSecurityException
Copyright © 2008–2019 The Apache Software Foundation. All rights reserved.