@Override
	public synchronized String chooseClientAlias(final String[] keyType, final Principal[] issuers, Socket socket) {
		if (CacHookingAgent.DEBUG) {
			System.out.println("chooseClientAlias: ");
		}
		if (choosenAlias != null) {
			if (CacHookingAgent.DEBUG) {
				System.out.println("cached chooseClientAlias: " + choosenAlias);
			}
			return choosenAlias;
		}

		Config config = Config.loadFromUserHome();
		choosenAlias = config.getDefaultCertificateName();
		if (choosenAlias != null) {
			choosenAlias = choosenAlias.trim();
			if (!choosenAlias.isEmpty()) {
				if (CacHookingAgent.DEBUG) {
					System.out.println("config chooseClientAlias: " + choosenAlias);
				}
				return choosenAlias;
			}
		}

		try {
			final String[] aliases = getClientAliases(null, issuers);
			choosenAlias = chooser.chooseFromAliases(aliases);
		} catch (Exception e) {
			throw reportAndConvert(e);
		}
		if (CacHookingAgent.DEBUG) {
			System.out.println("chooseClientAlias: " + choosenAlias);
		}
		return choosenAlias;
	}