org.eclipse.jetty.util.ssl

## Class AliasedX509KeyManager

- java.lang.Object
- - org.eclipse.jetty.util.ssl.AliasedX509KeyManager

All Implemented Interfaces:
  KeyManager, X509KeyManager

    public class AliasedX509KeyManager
    extends Object
    implements X509KeyManager

KeyManager to select a key with desired alias while delegating processing to specified KeyManager Can be used both with server and client sockets

### Constructor Summary

Constructors
Constructor and Description
`AliasedX509KeyManager(String keyAlias, X509KeyManager keyManager)` Construct KeyManager instance

### Method Summary

Methods
`String` `chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)`
`String` `chooseServerAlias(String keyType, Principal[] issuers, Socket socket)`
`X509Certificate[]` `getCertificateChain(String alias)`
`String[]` `getClientAliases(String keyType, Principal[] issuers)`
`PrivateKey` `getPrivateKey(String alias)`
`String[]` `getServerAliases(String keyType, Principal[] issuers)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AliasedX509KeyManager

    public AliasedX509KeyManager(String keyAlias,
                         X509KeyManager keyManager)
                          throws Exception

Construct KeyManager instance

Parameters:
  `keyAlias` - Alias of the key to be selected
  `keyManager` - Instance of KeyManager to be wrapped
Throws:
  `Exception`

### Method Detail

#### chooseClientAlias

    public String chooseClientAlias(String[] keyType,
                           Principal[] issuers,
                           Socket socket)

Specified by:
  `chooseClientAlias` in interface `X509KeyManager`
See Also:
  `X509KeyManager.chooseClientAlias(java.lang.String[], java.security.Principal[], java.net.Socket)`

#### chooseServerAlias

    public String chooseServerAlias(String keyType,
                           Principal[] issuers,
                           Socket socket)

Specified by:
  `chooseServerAlias` in interface `X509KeyManager`
See Also:
  `X509KeyManager.chooseServerAlias(java.lang.String, java.security.Principal[], java.net.Socket)`

#### getClientAliases

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

Specified by:
  `getClientAliases` in interface `X509KeyManager`
See Also:
  `X509KeyManager.getClientAliases(java.lang.String, java.security.Principal[])`

#### getServerAliases

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

Specified by:
  `getServerAliases` in interface `X509KeyManager`
See Also:
  `X509KeyManager.getServerAliases(java.lang.String, java.security.Principal[])`

#### getCertificateChain

    public X509Certificate[] getCertificateChain(String alias)

Specified by:
  `getCertificateChain` in interface `X509KeyManager`
See Also:
  `X509KeyManager.getCertificateChain(java.lang.String)`

#### getPrivateKey

    public PrivateKey getPrivateKey(String alias)

Specified by:
  `getPrivateKey` in interface `X509KeyManager`
See Also:
  `X509KeyManager.getPrivateKey(java.lang.String)`