public class KeyManagerImpl extends X509ExtendedKeyManager
KeyManager| Constructor and Description |
|---|
KeyManagerImpl(KeyStore keyStore,
char[] pwd)
Creates Key manager
|
| Modifier and Type | Method and Description |
|---|---|
String |
chooseClientAlias(String[] keyTypes,
Principal[] issuers,
Socket socket)
Chooses an alias for the client side of an SSL connection to authenticate
it with the specified public key type and certificate issuers.
|
String |
chooseEngineClientAlias(String[] keyTypes,
Principal[] issuers,
SSLEngine engine)
Chooses an alias for the client side of an SSL connection to authenticate
it with the specified public key type and certificate issuers.
|
String |
chooseEngineServerAlias(String keyType,
Principal[] issuers,
SSLEngine engine)
Chooses an alias for the server side of an SSL connection to authenticate
it with the specified public key type and certificate issuers.
|
String |
chooseServerAlias(String keyType,
Principal[] issuers,
Socket socket)
Chooses an alias for the server side of an SSL connection to authenticate
it with the specified public key type and certificate issuers.
|
X509Certificate[] |
getCertificateChain(String alias)
Returns the certificate chain for the specified alias.
|
String[] |
getClientAliases(String keyType,
Principal[] issuers)
Returns the client aliases for the specified public key type and list of
certificate issuers.
|
PrivateKey |
getPrivateKey(String alias)
Returns the private key for the specified alias.
|
String[] |
getServerAliases(String keyType,
Principal[] issuers)
Returns the server aliases for the specified public key type and list of
certificate issuers.
|
public KeyManagerImpl(KeyStore keyStore, char[] pwd)
keyStore - pwd - public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket)
X509KeyManagerkeyTypes - the list of public key algorithm names.issuers - the list of certificate issuers, or null if any issuer
will do.socket - the socket for the connection, or null if
the alias selected does not depend on a specific socket.null if there are no
matches.public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket)
X509KeyManagerkeyType - the list of public key algorithm type names.issuers - the list of certificate issuers, or null if any issuer
will do.socket - the socket for the connection, or null if
the alias selected does not depend on a specific socket.null if there are no
matches.public X509Certificate[] getCertificateChain(String alias)
X509KeyManageralias - the alias to get the certificate chain for.null if
the alias cannot be found.public String[] getClientAliases(String keyType, Principal[] issuers)
X509KeyManagerkeyType - the public key algorithm type name.issuers - the list of certificate issuers, or null if any issuer
will do.null if there are no matching aliases.public String[] getServerAliases(String keyType, Principal[] issuers)
X509KeyManagerkeyType - the public key algorithm type name.issuers - the list of certificate issuers, or null if any issuer
will do.null if there are no matching aliases.public PrivateKey getPrivateKey(String alias)
X509KeyManageralias - the alias to get the private key for.null if the
alias cannot be found.public String chooseEngineClientAlias(String[] keyTypes, Principal[] issuers, SSLEngine engine)
X509ExtendedKeyManagerchooseEngineClientAlias in class X509ExtendedKeyManagerkeyTypes - the list of public key algorithm names.issuers - the list of certificate issuers, or null if any issuer
will do.engine - the SSLEngine for the connection, or null if
no engine is predefined.null if there are no
matches.public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine)
X509ExtendedKeyManagerchooseEngineServerAlias in class X509ExtendedKeyManagerkeyType - the list of public key algorithm names.issuers - the list of certificate issuers, or null if any issuer
will do.engine - the SSLEngine for the connection, or null if
no engine is predefined.null if there are no
matches.