public class CertificateUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static KeyStore |
createKeyStore(String keypem,
String certpem) |
static KeyStore |
createTrustStore(Reader certReader)
"ca.pem" from Reader
|
static KeyStore |
createTrustStore(String capem)
"ca.pem" from String
|
static PrivateKey |
guessKey(byte[] encodedKey) |
static List<Certificate> |
loadCertificates(Reader reader)
"cert.pem" from reader
|
static List<Certificate> |
loadCertificates(String certpem)
from "cert.pem" String
|
static PrivateKey |
loadPrivateKey(Reader reader)
Return private key ("key.pem") from Reader
|
static PrivateKey |
loadPrivateKey(String keypem)
Return KeyPair from "key.pem"
|
static boolean |
verifyCertificatesExist(String dockerCertPath) |
public static boolean verifyCertificatesExist(String dockerCertPath)
public static KeyStore createKeyStore(String keypem, String certpem) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException, CertificateException, KeyStoreException
public static List<Certificate> loadCertificates(String certpem) throws IOException, CertificateException
IOExceptionCertificateExceptionpublic static List<Certificate> loadCertificates(Reader reader) throws IOException, CertificateException
IOExceptionCertificateException@CheckForNull public static PrivateKey loadPrivateKey(Reader reader) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException
@CheckForNull public static PrivateKey guessKey(byte[] encodedKey) throws NoSuchAlgorithmException
NoSuchAlgorithmException@CheckForNull public static PrivateKey loadPrivateKey(String keypem) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException
public static KeyStore createTrustStore(String capem) throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException
public static KeyStore createTrustStore(Reader certReader) throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException
Copyright © 2017. All Rights Reserved.