| Constructor and Description |
|---|
KeystoreFactory() |
KeystoreFactory(org.springframework.core.io.ResourceLoader resourceLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyToKeystore(KeyStore keyStore,
X509Certificate cert,
RSAPrivateKey privateKey,
String alias,
String password)
Based on a public certificate, private key, alias and password, this method will load the certificate and
private key as an entry into the keystore, and it will set the provided alias and password to the keystore entry.
|
KeyStore |
createEmptyKeystore()
Returns an empty KeyStore object.
|
X509Certificate |
loadCert(String certLocation)
Given a resource location it loads a PEM X509 certificate.
|
KeyStore |
loadKeystore(String certResourceLocation,
String privateKeyResourceLocation,
String alias,
String keyPassword)
Based on a public certificate, private key, alias and password, this method will load the certificate and
private key as an entry into a newly created keystore, and it will set the provided alias and password to the
keystore entry.
|
RSAPrivateKey |
loadPrivateKey(String privateKeyLocation)
Given a resource location it loads a DER RSA private Key.
|
void |
setResourceLoader(org.springframework.core.io.DefaultResourceLoader resourceLoader) |
public KeystoreFactory()
public KeystoreFactory(org.springframework.core.io.ResourceLoader resourceLoader)
public KeyStore loadKeystore(String certResourceLocation, String privateKeyResourceLocation, String alias, String keyPassword)
certResourceLocation - privateKeyResourceLocation - alias - keyPassword - public void addKeyToKeystore(KeyStore keyStore, X509Certificate cert, RSAPrivateKey privateKey, String alias, String password)
keyStore - cert - privateKey - alias - password - public KeyStore createEmptyKeystore()
public X509Certificate loadCert(String certLocation)
certLocation - public RSAPrivateKey loadPrivateKey(String privateKeyLocation)
privateKeyLocation - public void setResourceLoader(org.springframework.core.io.DefaultResourceLoader resourceLoader)
Copyright © 2018. All rights reserved.