final class DNIeKeyManagerImpl
extends javax.net.ssl.X509ExtendedKeyManager
X509KeyManager
Constructor and Description |
---|
DNIeKeyManagerImpl(java.security.KeyStore keyStore,
char[] password,
KeyManagerPolicy keyManagerPolicy,
android.app.Activity activity)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
chooseClientAlias(java.lang.String[] keyType,
java.security.Principal[] issuers,
java.net.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).
|
java.lang.String |
chooseEngineClientAlias(java.lang.String[] keyType,
java.security.Principal[] issuers,
javax.net.ssl.SSLEngine engine)
Choose an alias to authenticate the client side of an
SSLEngine connection given the public key type
and the list of certificate issuer authorities recognized by
the peer (if any). |
java.lang.String |
chooseEngineServerAlias(java.lang.String keyType,
java.security.Principal[] issuers,
javax.net.ssl.SSLEngine engine)
Choose an alias to authenticate the server side of an
SSLEngine connection given the public key type
and the list of certificate issuer authorities recognized by
the peer (if any). |
java.lang.String |
chooseServerAlias(java.lang.String keyType,
java.security.Principal[] issuers,
java.net.Socket socket)
Choose an alias to authenticate 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).
|
java.security.cert.X509Certificate[] |
getCertificateChain(java.lang.String alias)
Returns the certificate chain associated with the given alias.
|
java.lang.String[] |
getClientAliases(java.lang.String keyType,
java.security.Principal[] issuers)
Get the matching aliases for authenticating 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).
|
java.security.PrivateKey |
getPrivateKey(java.lang.String alias)
Returns the key associated with the given alias.
|
java.lang.String[] |
getServerAliases(java.lang.String keyType,
java.security.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 DNIeKeyManagerImpl(java.security.KeyStore keyStore, char[] password, KeyManagerPolicy keyManagerPolicy, android.app.Activity activity)
keyStore
- keystore with the user keyspassword
- password of the keystorekeyManagerPolicy
- the policy to apply in order to select the user keyspublic java.lang.String chooseClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, java.net.Socket socket)
javax.net.ssl.X509KeyManager
keyType
- 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, which indicates that
implementations are free to select an alias applicable
to any socket.public java.lang.String chooseServerAlias(java.lang.String keyType, java.security.Principal[] issuers, java.net.Socket socket)
javax.net.ssl.X509KeyManager
keyType
- the key algorithm type name.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, which indicates that
implementations are free to select an alias applicable
to any socket.public java.security.cert.X509Certificate[] getCertificateChain(java.lang.String alias)
javax.net.ssl.X509KeyManager
alias
- the alias namepublic java.lang.String[] getClientAliases(java.lang.String keyType, java.security.Principal[] issuers)
javax.net.ssl.X509KeyManager
keyType
- 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 java.lang.String[] getServerAliases(java.lang.String keyType, java.security.Principal[] issuers)
javax.net.ssl.X509KeyManager
keyType
- 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 java.security.PrivateKey getPrivateKey(java.lang.String alias)
javax.net.ssl.X509KeyManager
alias
- the alias namepublic java.lang.String chooseEngineClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
javax.net.ssl.X509ExtendedKeyManager
SSLEngine
connection given the public key type
and the list of certificate issuer authorities recognized by
the peer (if any).
The default implementation returns null.
chooseEngineClientAlias
in class javax.net.ssl.X509ExtendedKeyManager
keyType
- 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.engine
- the SSLEngine
to be used for this
connection. This parameter can be null, which indicates
that implementations of this interface are free to
select an alias applicable to any engine.public java.lang.String chooseEngineServerAlias(java.lang.String keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
javax.net.ssl.X509ExtendedKeyManager
SSLEngine
connection given the public key type
and the list of certificate issuer authorities recognized by
the peer (if any).
The default implementation returns null.
chooseEngineServerAlias
in class javax.net.ssl.X509ExtendedKeyManager
keyType
- the key algorithm type name.issuers
- the list of acceptable CA issuer subject names
or null if it does not matter which issuers are used.engine
- the SSLEngine
to be used for this
connection. This parameter can be null, which indicates
that implementations of this interface are free to
select an alias applicable to any engine.