org.eclipse.jetty.util.ssl

## Class AliasedX509KeyManager

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

- All Implemented Interfaces:
    javax.net.ssl.KeyManager, javax.net.ssl.X509KeyManager

      public class AliasedX509KeyManager
      extends java.lang.Object
      implements javax.net.ssl.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(java.lang.String keyAlias, javax.net.ssl.X509KeyManager keyManager)` Construct KeyManager instance

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `chooseClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, java.net.Socket socket)`
    `java.lang.String` | `chooseServerAlias(java.lang.String keyType, java.security.Principal[] issuers, java.net.Socket socket)`
    `java.security.cert.X509Certificate[]` | `getCertificateChain(java.lang.String alias)`
    `java.lang.String[]` | `getClientAliases(java.lang.String keyType, java.security.Principal[] issuers)`
    `java.security.PrivateKey` | `getPrivateKey(java.lang.String alias)`
    `java.lang.String[]` | `getServerAliases(java.lang.String keyType, java.security.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(java.lang.String keyAlias,
                               javax.net.ssl.X509KeyManager keyManager)
                                throws java.lang.Exception

      Construct KeyManager instance
      Parameters:
        `keyAlias` - Alias of the key to be selected
        `keyManager` - Instance of KeyManager to be wrapped
      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### chooseClientAlias

          public java.lang.String chooseClientAlias(java.lang.String[] keyType,
                                           java.security.Principal[] issuers,
                                           java.net.Socket socket)

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

    - #### chooseServerAlias

          public java.lang.String chooseServerAlias(java.lang.String keyType,
                                           java.security.Principal[] issuers,
                                           java.net.Socket socket)

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

    - #### getClientAliases

          public java.lang.String[] getClientAliases(java.lang.String keyType,
                                            java.security.Principal[] issuers)

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

    - #### getServerAliases

          public java.lang.String[] getServerAliases(java.lang.String keyType,
                                            java.security.Principal[] issuers)

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

    - #### getCertificateChain

          public java.security.cert.X509Certificate[] getCertificateChain(java.lang.String alias)

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

    - #### getPrivateKey

          public java.security.PrivateKey getPrivateKey(java.lang.String alias)

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

Copyright © 2013 FuseSource, Corp.. All Rights Reserved.