public class X509KeyManagerX509CredentialAdapter extends AbstractCredential implements X509Credential
X509KeyManager and exposes it as an X509Credential.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
credentialAlias
Alias used to reference the credential in the key manager.
|
private javax.net.ssl.X509KeyManager |
keyManager
Wrapped key manager.
|
| Constructor and Description |
|---|
X509KeyManagerX509CredentialAdapter(javax.net.ssl.X509KeyManager manager,
java.lang.String alias)
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 final java.lang.String credentialAlias
private final javax.net.ssl.X509KeyManager keyManager
public X509KeyManagerX509CredentialAdapter(@Nonnull
javax.net.ssl.X509KeyManager manager,
@Nonnull
java.lang.String alias)
manager - wrapped key manageralias - alias used to reference the credential in the key manager@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