Class AMX509KeyManagerImpl
- java.lang.Object
-
- com.sun.identity.security.keystore.v_14.AMX509KeyManagerImpl
-
- All Implemented Interfaces:
AMX509KeyManager,KeyManager,X509KeyManager
public class AMX509KeyManagerImpl extends Object implements AMX509KeyManager
TheAMX509KeyManagerImplclass implements JSSE X509KeyManager interface. This implementation is the same as JSSE default implementation exception it will supply user-specified client certificate alias when client authentication is on.
-
-
Constructor Summary
Constructors Constructor Description AMX509KeyManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringchooseClientAlias(String[] keyType, Principal[] issuers, Socket sock)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).StringchooseServerAlias(String keyType, Principal[] issuers, Socket sock)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[]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 client side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any).PrivateKeygetPrivateKey(String alias)Returns the private 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).voidsetAlias(String alias)This constructor takes a JSSE default implementation and a user-specified client certificate alias.
-
-
-
Field Detail
-
debug
public static Debug debug
-
-
Method Detail
-
setAlias
public void setAlias(String alias)
This constructor takes a JSSE default implementation and a user-specified client certificate alias.- Specified by:
setAliasin interfaceAMX509KeyManager- Parameters:
alias- certificate alias
-
chooseClientAlias
public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket sock)
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). If the certAlias specified in the constructor is not null, it will be used.- Specified by:
chooseClientAliasin interfaceX509KeyManager- Parameters:
keyType- the key algorithm type nameissuers- the list of acceptable CA issuer subject names- Returns:
- the alias name for the desired key
-
chooseServerAlias
public String chooseServerAlias(String keyType, Principal[] issuers, Socket sock)
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).- Specified by:
chooseServerAliasin interfaceX509KeyManager- Parameters:
keyType- the key algorithm type nameissuers- the list of acceptable CA issuer subject names- Returns:
- the alias name for the desired key
-
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).- Specified by:
getClientAliasesin interfaceX509KeyManager- Parameters:
keyType- the key algorithm type nameissuers- the list of acceptable CA issuer subject names- Returns:
- the matching alias names
-
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).- Specified by:
getServerAliasesin interfaceX509KeyManager- Parameters:
keyType- the key algorithm type nameissuers- the list of acceptable CA issuer subject names- Returns:
- the matching alias names
-
getCertificateChain
public X509Certificate[] getCertificateChain(String alias)
Returns the certificate chain associated with the given alias.- Specified by:
getCertificateChainin interfaceX509KeyManager- Parameters:
alias- the alias name- Returns:
- the certificate chain (ordered with the user's certificate first and the root certificate authority last)
-
getPrivateKey
public PrivateKey getPrivateKey(String alias)
Returns the private key associated with the given alias.- Specified by:
getPrivateKeyin interfaceX509KeyManager- Returns:
- the private key associated with the given alias
-
-