org.eclipse.jetty.util.ssl

## Class AliasedX509ExtendedKeyManager

- java.lang.Object
- - javax.net.ssl.X509ExtendedKeyManager
  - - org.eclipse.jetty.util.ssl.AliasedX509ExtendedKeyManager

- All Implemented Interfaces:
    KeyManager, X509KeyManager

      public class AliasedX509ExtendedKeyManager
      extends X509ExtendedKeyManager

  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
    `AliasedX509ExtendedKeyManager(String keyAlias, X509KeyManager keyManager)` Construct KeyManager instance

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)`
    `String` | `chooseEngineClientAlias(String[] keyType, Principal[] issuers, SSLEngine engine)`
    `String` | `chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine)`
    `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

    - #### AliasedX509ExtendedKeyManager

          public AliasedX509ExtendedKeyManager(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)

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

    - #### chooseServerAlias

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

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

    - #### getClientAliases

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

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

    - #### getServerAliases

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

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

    - #### getCertificateChain

          public X509Certificate[] getCertificateChain(String alias)

      See Also:
        `X509KeyManager.getCertificateChain(java.lang.String)`

    - #### getPrivateKey

          public PrivateKey getPrivateKey(String alias)

      See Also:
        `X509KeyManager.getPrivateKey(java.lang.String)`

    - #### chooseEngineServerAlias

          public String chooseEngineServerAlias(String keyType,
                                       Principal[] issuers,
                                       SSLEngine engine)

      Overrides:
        `chooseEngineServerAlias` in class `X509ExtendedKeyManager`
      See Also:
        `X509ExtendedKeyManager.chooseEngineServerAlias(java.lang.String, java.security.Principal[], javax.net.ssl.SSLEngine)`

    - #### chooseEngineClientAlias

          public String chooseEngineClientAlias(String[] keyType,
                                       Principal[] issuers,
                                       SSLEngine engine)

      Overrides:
        `chooseEngineClientAlias` in class `X509ExtendedKeyManager`
      See Also:
        `X509ExtendedKeyManager.chooseEngineClientAlias(String[], Principal[], SSLEngine)`

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.