public class KeyStoreX509CredentialAdapter extends AbstractCredential implements X509Credential
KeyStore in to a X509Credential.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
credentialAlias
Alias to the credential to be exposed.
|
private char[] |
keyPassword
Password for the key to be exposed.
|
private java.security.KeyStore |
keyStore
Keystore that contains the credential to be exposed.
|
private org.slf4j.Logger |
log
Class logger.
|
| Constructor and Description |
|---|
KeyStoreX509CredentialAdapter(java.security.KeyStore store,
java.lang.String alias,
char[] password)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<? extends Credential> |
getCredentialType()
Get the primary type of the credential instance.
|
java.util.Collection<java.security.cert.X509CRL> |
getCRLs()
Gets a collection of CRLs associated with the credential.
|
java.security.cert.X509Certificate |
getEntityCertificate()
Gets the public key certificate for the entity.
|
java.util.Collection<java.security.cert.X509Certificate> |
getEntityCertificateChain()
Gets an immutable collection of certificates in the entity's trust chain.
|
java.security.PrivateKey |
getPrivateKey()
Gets the private key for the entity if there is one.
|
java.security.PublicKey |
getPublicKey()
Gets the public key for the entity.
|
void |
setEntityId(java.lang.String newEntityID)
Sets the ID of the entity this credential is for.
|
void |
setUsageType(UsageType newUsageType)
Sets the usage type for this credential.
|
getCredentialContextSet, getEntityId, getKeyNames, getSecretKey, getUsageType, setPrivateKey, setPublicKey, setSecretKeyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCredentialContextSet, getEntityId, getKeyNames, getSecretKey, getUsageTypeprivate org.slf4j.Logger log
private final java.security.KeyStore keyStore
private final java.lang.String credentialAlias
private final char[] keyPassword
public KeyStoreX509CredentialAdapter(@Nonnull
java.security.KeyStore store,
@Nonnull
java.lang.String alias,
@Nullable
char[] password)
store - store containing key to be exposedalias - alias to the credential to be exposedpassword - password to the key to be exposed@Nullable public java.util.Collection<java.security.cert.X509CRL> getCRLs()
getCRLs in interface X509Credential@Nonnull public java.security.cert.X509Certificate getEntityCertificate()
Credential.getPublicKey().getEntityCertificate in interface X509Credential@Nonnull public java.util.Collection<java.security.cert.X509Certificate> getEntityCertificateChain()
getEntityCertificateChain in interface X509Credential@Nullable public java.security.PrivateKey getPrivateKey()
getPrivateKey in interface CredentialgetPrivateKey in class AbstractCredential@Nullable public java.security.PublicKey getPublicKey()
getPublicKey in interface CredentialgetPublicKey in class AbstractCredential@Nonnull public java.lang.Class<? extends Credential> getCredentialType()
Credential implemented by an implementation.getCredentialType in interface Credentialpublic void setEntityId(@Nullable
java.lang.String newEntityID)
setEntityId in class AbstractCredentialnewEntityID - ID of the entity this credential is forpublic void setUsageType(@Nonnull
UsageType newUsageType)
setUsageType in class AbstractCredentialnewUsageType - usage type for this credential