當前位置: 首頁>>代碼示例>>Java>>正文


Java X509KeyManager.chooseServerAlias方法代碼示例

本文整理匯總了Java中javax.net.ssl.X509KeyManager.chooseServerAlias方法的典型用法代碼示例。如果您正苦於以下問題:Java X509KeyManager.chooseServerAlias方法的具體用法?Java X509KeyManager.chooseServerAlias怎麽用?Java X509KeyManager.chooseServerAlias使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.net.ssl.X509KeyManager的用法示例。


在下文中一共展示了X509KeyManager.chooseServerAlias方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: chooseServerAlias

import javax.net.ssl.X509KeyManager; //導入方法依賴的package包/類
@Override
public String chooseServerAlias(final String keyType, final Principal[] issuers, final Socket socket) {
    for (final X509KeyManager keyManager : keyManagers) {
        final String alias = keyManager.chooseServerAlias(keyType, issuers, socket);
        if (alias != null) {
            return alias;
        }
    }
    return null;
}
 
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:11,代碼來源:FileTrustStoreSslSocketFactory.java

示例2: chooseServerAlias

import javax.net.ssl.X509KeyManager; //導入方法依賴的package包/類
@Override
public String chooseServerAlias(X509KeyManager keyManager, String keyType) {
    if (keyManager instanceof X509ExtendedKeyManager) {
        X509ExtendedKeyManager ekm = (X509ExtendedKeyManager) keyManager;
        return ekm.chooseEngineServerAlias(keyType, null, this);
    } else {
        return keyManager.chooseServerAlias(keyType, null, null);
    }
}
 
開發者ID:google,項目名稱:conscrypt,代碼行數:10,代碼來源:ConscryptEngine.java

示例3: chooseServerAlias

import javax.net.ssl.X509KeyManager; //導入方法依賴的package包/類
public synchronized String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {
    if (_preferredKeyManager != null)
        return _preferredKeyManager.chooseServerAlias(keyType, issuers, socket);
    
    Iterator<String> it = _managers.keySet().iterator();
    while (it.hasNext()) {
        String source = it.next();
        X509KeyManager km = _managers.get(source);
        String alias = km.chooseServerAlias(keyType, issuers, socket);
        if (alias != null) return source + SEP + alias;
    }
    return null;
}
 
開發者ID:Neraud,項目名稱:PADListener,代碼行數:14,代碼來源:SSLKeyManager.java

示例4: chooseServerAlias

import javax.net.ssl.X509KeyManager; //導入方法依賴的package包/類
/**
 * Chooses the first non-null server alias returned from the delegate {@link X509TrustManagers},
 * or {@code null} if there are no matches.
 */
@Override
public @Nullable String chooseServerAlias(String keyType, Principal[] issuers, Socket socket){
	for (List<X509KeyManager> keyManagers : keyManagers.values()) {
		for (X509KeyManager x509KeyManager : keyManagers) {
			String alias = x509KeyManager.chooseServerAlias(keyType, issuers, socket);
			if (alias != null) {
				return alias;
			}
		}
	}
	return null;
}
 
開發者ID:elexis,項目名稱:elexis-3-core,代碼行數:17,代碼來源:CompositeX509KeyManager.java

示例5: chooseServerAlias

import javax.net.ssl.X509KeyManager; //導入方法依賴的package包/類
@Override
public final String chooseServerAlias(X509KeyManager keyManager, String keyType) {
    return keyManager.chooseServerAlias(keyType, null, this);
}
 
開發者ID:google,項目名稱:conscrypt,代碼行數:5,代碼來源:ConscryptFileDescriptorSocket.java


注:本文中的javax.net.ssl.X509KeyManager.chooseServerAlias方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。