public class EnvKeyStore extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
asFile(java.util.function.Consumer<File> c) |
static EnvKeyStore |
create(String trustEnvVar,
String passwordEnvVar)
Create a TrustStore representation from an environment variable.
|
static EnvKeyStore |
create(String keyEnvVar,
String certEnvVar,
String passwordEnvVar)
Create a KeyStore representation from environment variables.
|
static EnvKeyStore |
createWithRandomPassword(String trustEnvVar)
Create a TrustStore representation from an environment variable.
|
static EnvKeyStore |
createWithRandomPassword(String keyEnvVar,
String certEnvVar)
Create a KeyStore representation from environment variables.
|
KeyStore |
keyStore() |
String |
password() |
void |
store(OutputStream out) |
void |
store(java.nio.file.Path path) |
File |
storeTemp() |
byte[] |
toBytes() |
InputStream |
toInputStream() |
String |
type() |
public static EnvKeyStore create(String keyEnvVar, String certEnvVar, String passwordEnvVar) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException
keyEnvVar - The environment variable name of the keycertEnvVar - The environment variable name of the certificatepasswordEnvVar - The environment variable name of the passwordCertificateExceptionNoSuchAlgorithmExceptionKeyStoreExceptionIOExceptionpublic static EnvKeyStore create(String trustEnvVar, String passwordEnvVar) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException
trustEnvVar - The environment variable name of the certificatepasswordEnvVar - The environment variable name of the passwordCertificateExceptionNoSuchAlgorithmExceptionKeyStoreExceptionIOExceptionpublic static EnvKeyStore createWithRandomPassword(String keyEnvVar, String certEnvVar) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException
keyEnvVar - The environment variable name of the keycertEnvVar - The environment variable name of the certificateCertificateExceptionNoSuchAlgorithmExceptionKeyStoreExceptionIOExceptionpublic static EnvKeyStore createWithRandomPassword(String trustEnvVar) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException
trustEnvVar - The environment variable name of the certificateCertificateExceptionNoSuchAlgorithmExceptionKeyStoreExceptionIOExceptionpublic String password()
public KeyStore keyStore()
public String type()
public InputStream toInputStream() throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException
public byte[] toBytes()
throws CertificateException,
NoSuchAlgorithmException,
KeyStoreException,
IOException
public void store(OutputStream out) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException
public void store(java.nio.file.Path path) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException
public File storeTemp() throws IOException, CertificateException, NoSuchAlgorithmException, KeyStoreException
public void asFile(java.util.function.Consumer<File> c) throws IOException, CertificateException, NoSuchAlgorithmException, KeyStoreException
Copyright © 2017. All Rights Reserved.