This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.net.ssl
interface X509KeyManager

All Superinterfaces:
KeyManager
All Known Implementing Classes:
X509ExtendedKeyManager

public interface X509KeyManager
extends KeyManager

Instances of this interface manage which X509 certificate-based key pairs are used to authenticate the local side of a secure socket.

During secure socket negotiations, implentations call methods in this interface to:

Note: the X509ExtendedKeyManager should be used in favor of this class.

See Also (auto-generated):

SSLContext

KeyManagerFactory

KeyStore


Method Summary
 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 server side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any).
 X509Certificate[]

          Returns the certificate chain associated with the given alias.
 String[]
getClientAliases(String keyType, 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).
 PrivateKey

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

Method Detail

chooseClientAlias

public 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).

Parameters:
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.
Returns:
the alias name for the desired key, or null if there are no matches.

chooseServerAlias

public String chooseServerAlias(String keyType,
                                Principal[] issuers,
                                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).

Parameters:
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.
Returns:
the alias name for the desired key, or null if there are no matches.

getCertificateChain

public X509Certificate[] getCertificateChain(String alias)
Returns the certificate chain associated with the given alias.

Parameters:
alias - the alias name
Returns:
the certificate chain (ordered with the user's certificate first and the root certificate authority last), or null if the alias can't be found.

getClientAliases

public String[] getClientAliases(String keyType,
                                 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).

Parameters:
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.
Returns:
an array of the matching alias names, or null if there were no matches.

getPrivateKey

public PrivateKey getPrivateKey(String alias)
Returns the key associated with the given alias.

Parameters:
alias - the alias name
Returns:
the requested key, or null if the alias can't be found.

getServerAliases

public 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).

Parameters:
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.
Returns:
an array of the matching alias names, or null if there were no matches.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.