if (mgrs == null) { throw new IllegalArgumentException("Null array of X509TrustManagers"); } this.mgrs = mgrs; HashSet tset = new HashSet(); //for uniqueness for (int i = 0; i < mgrs.length; i++) { X509Certificate[] tcerts = mgrs[i].getAcceptedIssuers(); if (tcerts != null && tcerts.length > 0) { for (int j = 0; j < tcerts.length; j++) { tset.add(tcerts[j]); } } } issuers = new X509Certificate[tset.size()]; Iterator iter = tset.iterator(); for (int i = 0; iter.hasNext(); i++) { issuers[i] = (X509Certificate)iter.next(); }
CertificateException cex = null; for (int i = 0; i < mgrs.length; i++) { try { cex = null; //reset exception status mgrs[i].checkClientTrusted(chain, authType); break; } catch(CertificateException ex) { cex = ex; } } if (cex != null) { throw cex; }
CertificateException cex = null; for (int i = 0; i < mgrs.length; i++) { try { cex = null; //reset exception status mgrs[i].checkServerTrusted(chain, authType); break; } catch(CertificateException ex) { cex = ex; } } if (cex != null) { throw cex; }
return issuers;