c
class
MyKeyManager
implements
X509KeyManager {
private
X509KeyManager delegate;
public
MyKeyManager(X509KeyManager delegate){
this
.delegate = delegate;
}
@Override
public
String[] getClientAliases(String keyType, Principal[] issuers) {
return
delegate.getClientAliases(keyType, issuers);
}
@Override
public
String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) {
return
delegate.chooseClientAlias(keyType, issuers, socket);
}
@Override
public
String[] getServerAliases(String keyType, Principal[] issuers) {
return
delegate.getServerAliases(keyType, issuers);
}
@Override
public
String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {
return
delegate.chooseServerAlias(keyType, issuers, socket);
}
@Override
public
X509Certificate[] getCertificateChain(String alias) {
return
delegate.getCertificateChain(alias);
}
@Override
public
PrivateKey getPrivateKey(String alias) {
return
delegate.getPrivateKey(alias);
}
}
|
本文转自 anranran 51CTO博客,原文链接:http://blog.51cto.com/guojuanjun/1955239