public void establishTrust( String conduitName, URLConnectionInfo cinfo, Message message ) throws UntrustedURLConnectionIOException { called++; HttpsURLConnectionInfo ci = (HttpsURLConnectionInfo) cinfo; boolean trusted = false; for (int i = 0; i < trustName.length; i++) { trusted = trusted || ci.getPeerPrincipal() .toString().contains("OU=" + trustName[i]); } if (!trusted) { throw new UntrustedURLConnectionIOException( "Peer Principal \"" + ci.getPeerPrincipal() + "\" does not contain " + getTrustNames()); } }