if(isClientMode && !isServerAuthMode())
{
// we are in client mode and do not want to perform server cert authentication
// return a trust manager that trusts all certs
trustManagers = new TrustManager[] {
new X509TrustManager() {
public void checkClientTrusted( X509Certificate[] chain, String authType ) {}
public void checkServerTrusted( X509Certificate[] chain, String authType ) {}
public X509Certificate[] getAcceptedIssuers() { return null; }
}};
}