public class ApplicationKeyManager extends Object implements X509KeyManager
| Constructor and Description |
|---|
ApplicationKeyManager(KeyStore keystore,
char[] password)
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
chooseClientAlias(String[] keyType,
Principal[] issuers,
Socket socket)
Choose an alias to authenticate the client side of a secure
socket given the public key type and the list of certificate
issuer authorities recognized by the peer (if any).
|
String |
chooseServerAlias(String keyType,
Principal[] issuers,
Socket socket)
Choose an alias to authenticate the client side of a secure
socket given the public key type and the list of certificate
issuer authorities recognized by the peer (if any).
|
X509Certificate[] |
getCertificateChain(String alias)
Returns the certificate chain associated with the given alias.
|
String[] |
getClientAliases(String keyType,
Principal[] issuers)
Get the matching aliases for authenticating the server side of a
secure socket given the public key type and the list of
certificate issuer authorities recognized by the peer (if any).
|
PrivateKey |
getPrivateKey(String alias)
Returns the key associated with the given alias.
|
String[] |
getServerAliases(String keyType,
Principal[] issuers)
Get the matching aliases for authenticating the server side of a
secure socket given the public key type and the list of
certificate issuer authorities recognized by the peer (if any).
|
public ApplicationKeyManager(KeyStore keystore, char[] password)
keystore - The keystore to use for this keymanager.password - The keystore password to use for this keymanager.public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
chooseClientAlias in interface X509KeyManagerkeyType - the key algorithm type name(s), ordered with the
most-preferred key type first.issuers - the list of acceptable CA issuer subject names or null
if it does not matter which issuers are used.socket - the socket to be used for this connection. This
parameter can be null, in which case this method will
return the most generic alias to use.public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket)
chooseServerAlias in interface X509KeyManagerkeyType - the key algorithm type name(s), ordered with the
most-preferred key type first.issuers - the list of acceptable CA issuer subject names or null
if it does not matter which issuers are used.socket - the socket to be used for this connection. This
parameter can be null, in which case this method will
return the most generic alias to use.public X509Certificate[] getCertificateChain(String alias)
getCertificateChain in interface X509KeyManageralias - the alias namepublic String[] getClientAliases(String keyType, Principal[] issuers)
getClientAliases in interface X509KeyManagerkeyType - the key algorithm type nameissuers - the list of acceptable CA issuer subject names or null
if it does not matter which issuers are used.public PrivateKey getPrivateKey(String alias)
getPrivateKey in interface X509KeyManageralias - the alias namepublic String[] getServerAliases(String keyType, Principal[] issuers)
getServerAliases in interface X509KeyManagerkeyType - the key algorithm type nameissuers - the list of acceptable CA issuer subject names or null
if it does not matter which issuers are used.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.