Skip to content

Most visited

Recently visited

navigation
Added in API level 1

X509KeyManager

public interface X509KeyManager
implements KeyManager

javax.net.ssl.X509KeyManager
Known Indirect Subclasses


A Key Manager for X509 certificate-based key pairs.

Summary

Public methods

abstract String chooseClientAlias(String[] keyType, 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.

abstract 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.

abstract X509Certificate[] getCertificateChain(String alias)

Returns the certificate chain for the specified alias.

abstract String[] getClientAliases(String keyType, Principal[] issuers)

Returns the client aliases for the specified public key type and list of certificate issuers.

abstract PrivateKey getPrivateKey(String alias)

Returns the private key for the specified alias.

abstract String[] getServerAliases(String keyType, Principal[] issuers)

Returns the server aliases for the specified public key type and list of certificate issuers.

Public methods

chooseClientAlias

Added in API level 1
String chooseClientAlias (String[] keyType, 
                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.

Parameters
keyType String: the list of public key algorithm names.
issuers Principal: the list of certificate issuers, or null if any issuer will do.
socket Socket: the socket for the connection, or null if the alias selected does not depend on a specific socket.
Returns
String the alias name of a matching key or null if there are no matches.

chooseServerAlias

Added in API level 1
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.

Parameters
keyType String: the list of public key algorithm type names.
issuers Principal: the list of certificate issuers, or null if any issuer will do.
socket Socket: the socket for the connection, or null if the alias selected does not depend on a specific socket.
Returns
String the alias name of a matching key or null if there are no matches.

getCertificateChain

Added in API level 1
X509Certificate[] getCertificateChain (String alias)

Returns the certificate chain for the specified alias.

Parameters
alias String: the alias to get the certificate chain for.
Returns
X509Certificate[] the certificate chain for the specified alias, or null if the alias cannot be found.

getClientAliases

Added in API level 1
String[] getClientAliases (String keyType, 
                Principal[] issuers)

Returns the client aliases for the specified public key type and list of certificate issuers.

Parameters
keyType String: the public key algorithm type name.
issuers Principal: the list of certificate issuers, or null if any issuer will do.
Returns
String[] the client aliases for the specified public key type, or null if there are no matching aliases.

getPrivateKey

Added in API level 1
PrivateKey getPrivateKey (String alias)

Returns the private key for the specified alias.

Parameters
alias String: the alias to get the private key for.
Returns
PrivateKey the private key for the specified alias, or null if the alias cannot be found.

getServerAliases

Added in API level 1
String[] getServerAliases (String keyType, 
                Principal[] issuers)

Returns the server aliases for the specified public key type and list of certificate issuers.

Parameters
keyType String: the public key algorithm type name.
issuers Principal: the list of certificate issuers, or null if any issuer will do.
Returns
String[] the client aliases for the specified public key type, or null if there are no matching aliases.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.