本文整理匯總了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);
}
}
示例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;
}
示例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;
}
示例5: chooseServerAlias
import javax.net.ssl.X509KeyManager; //導入方法依賴的package包/類
@Override
public final String chooseServerAlias(X509KeyManager keyManager, String keyType) {
return keyManager.chooseServerAlias(keyType, null, this);
}