Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  //
  //  ========================================================================
  //  Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd.
  //  ------------------------------------------------------------------------
  //  All rights reserved. This program and the accompanying materials
  //  are made available under the terms of the Eclipse Public License v1.0
  //  and Apache License v2.0 which accompanies this distribution.
  //
  //      The Eclipse Public License is available at
 //      http://www.eclipse.org/legal/epl-v10.html
 //
 //      The Apache License v2.0 is available at
 //      http://www.opensource.org/licenses/apache2.0.php
 //
 //  You may elect to redistribute this code under either of these licenses.
 //  ========================================================================
 //
 
 package org.eclipse.jetty.util.ssl;
 
 
 
 
 /* ------------------------------------------------------------ */
KeyManager to select a key with desired alias while delegating processing to specified KeyManager Can be used both with server and client sockets
 
 {
     private String _keyAlias;
     private X509KeyManager _keyManager;
 
     /* ------------------------------------------------------------ */
    
Construct KeyManager instance

Parameters:
keyAlias Alias of the key to be selected
keyManager Instance of KeyManager to be wrapped
Throws:
java.lang.Exception
 
     public AliasedX509ExtendedKeyManager(String keyAliasX509KeyManager keyManagerthrows Exception
     {
          = keyAlias;
          = keyManager;
     }
 
     /* ------------------------------------------------------------ */
    
 
     public String chooseClientAlias(String[] keyTypePrincipal[] issuersSocket socket)
     {
         return  == null ? .chooseClientAlias(keyTypeissuerssocket) : ;
     }
 
     /* ------------------------------------------------------------ */
    
 
     public String chooseServerAlias(String keyTypePrincipal[] issuersSocket socket)
     {   
         return  == null ? .chooseServerAlias(keyTypeissuerssocket) : ;
     }
 
     /* ------------------------------------------------------------ */
    
 
     public String[] getClientAliases(String keyTypePrincipal[] issuers)
     {
         return .getClientAliases(keyTypeissuers);
     }
 
 
     /* ------------------------------------------------------------ */
    
 
     public String[] getServerAliases(String keyTypePrincipal[] issuers)
     {
         return .getServerAliases(keyTypeissuers);
     }
 
     /* ------------------------------------------------------------ */
    
 
     public X509Certificate[] getCertificateChain(String alias)
     {
         return .getCertificateChain(alias);
     }
    /* ------------------------------------------------------------ */
    
    public PrivateKey getPrivateKey(String alias)
    {
        return .getPrivateKey(alias);
    }
    /* ------------------------------------------------------------ */
    
    @Override
    public String chooseEngineServerAlias(String keyTypePrincipal[] issuersSSLEngine engine)
    {
        return  == null ? super.chooseEngineServerAlias(keyType,issuers,engine) : ;
    }
    /* ------------------------------------------------------------ */
    
    @Override
    public String chooseEngineClientAlias(String keyType[], Principal[] issuersSSLEngine engine)
    {
        return  == null ? super.chooseEngineClientAlias(keyType,issuers,engine) : ;
    }
New to GrepCode? Check out our FAQ X