示例#1
0
 // this is where the customization comes in
 public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) {
   for (String keyType : keyTypes) {
     String[] aliases = keyManager.getClientAliases(keyType, null); // ignoring the issuers
     if (aliases != null && aliases.length > 0) {
       for (String alias : aliases) {
         if (this.alias.equals(alias)) {
           if (Debug.verboseOn())
             Debug.logVerbose(
                 "chooseClientAlias for keyType [" + keyType + "] got alias " + this.alias,
                 module);
           // Debug.logInfo(new Exception(), "Location where chooseClientAlias is called", module);
           return this.alias;
         }
       }
     }
   }
   return null;
 }
示例#2
0
 public String[] getClientAliases(String keyType, Principal[] issuers) {
   return keyManager.getClientAliases(keyType, 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).
  *
  * @param keyType The key algorithm type name
  * @param issuers The list of acceptable CA issuer subject names, or null if it does not matter
  *     which issuers are used
  * @return Array of the matching alias names, or null if there were no matches
  */
 public String[] getClientAliases(String keyType, Principal[] issuers) {
   return delegate.getClientAliases(keyType, issuers);
 }
示例#4
0
 public String[] getClientAliases(String s, Principal[] principals) {
   return wrapped.getClientAliases(s, principals);
 }
示例#5
0
 public String[] getClientAliases(String keyType, Principal[] issuers) {
   System.out.println("Calling from X509KeyManager");
   return km.getClientAliases(keyType, issuers);
 }
示例#6
0
 public String[] getClientAliases(String arg0, Principal[] arg1) {
   return pkixKeyManager.getClientAliases(arg0, arg1);
 }