public class MyTrustManager implements X509TrustManager {
MyTrustManager() { // constructor
// create/load keystore
}
public void checkClientTrusted(
X509Certificate chain[], String authType)
throws CertificatException {
}
public void checkServerTrusted(
X509Certificate chain[], String authType)
throws CertificationException {
// special handling such as poping dialog boxes
}
public X509Certificate[] getAcceptedIssuers() {
}
}
X509TrustManager xtm = new MyTrustManager()
TrustManager mytm[] = {xtm};