public class PKCS11PrivateKeyFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<PrivateKey>
PrivateKey from a PKCS#11 keystore.
This relies on the SunPKCS11 provider.| Modifier and Type | Field and Description |
|---|---|
private PrivateKey |
key
The singleton instance of the private key produced by this factory.
|
private String |
keyAlias
Alias for the private key.
|
private String |
keyPassword
Password for the private key.
|
private org.slf4j.Logger |
log
Class logger.
|
private String |
pkcs11Config
PKCS#11 provider parameter string.
|
private static Provider |
provider
Singleton
Provider for all instances of this factory. |
private static String |
PROVIDER_CLASS_NAME
The class name for the PKCS#11 provider class.
|
| Constructor and Description |
|---|
PKCS11PrivateKeyFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
String |
getKeyAlias()
Gets the key alias in use.
|
String |
getKeyPassword()
Gets the key password in use.
|
private KeyStore |
getKeyStore()
|
PrivateKey |
getObject() |
Class<?> |
getObjectType() |
String |
getPkcs11Config()
Returns the PKCS#11 configuration.
|
private Provider |
getProvider()
Gets the singleton PKCS#11
Provider. |
boolean |
isSingleton() |
void |
setKeyAlias(String alias)
Sets the key alias to use.
|
void |
setKeyPassword(String password)
Set the key password to use.
|
void |
setPkcs11Config(String config)
Sets the PKCS#11 configuration to use.
|
private static final String PROVIDER_CLASS_NAME
private final org.slf4j.Logger log
private String pkcs11Config
private String keyAlias
private String keyPassword
private PrivateKey key
public String getPkcs11Config()
public void setPkcs11Config(@Nonnull String config)
config - the PKCS#11 configuration to usepublic String getKeyAlias()
public void setKeyAlias(String alias)
alias - the key alias to usepublic String getKeyPassword()
public void setKeyPassword(@Nonnull String password)
password - the key password to usepublic PrivateKey getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<PrivateKey>Exception@Nonnull public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<PrivateKey>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<PrivateKey>Copyright © 1999–2019 Shibboleth Consortium. All rights reserved.