this.ks = ks; alias = s; this.pw = pw; try { java.security.cert.Certificate c = ks.getCertificate(s); type = c.getPublicKey().getAlgorithm(); issuer = ((X509Certificate) c).getIssuerDN().getName(); } catch (Exception e) { throw new IllegalArgumentException(s + " has a bad key"); }
if (!type.equals(this.type)) return null; if (issuers == null) return alias; for (int i = 0; i < issuers.length; i++) { if (issuer.equals(issuers[i].getName())) return alias; } return null;
return chooseClientAlias(type, issuers);
try { java.security.cert.Certificate[] c = ks.getCertificateChain(s); Vector c2 = new Vector(c.length); for (int i = 0; i < c.length; i++) c2.add(c[i]); return (X509Certificate[]) c2.toArray(new X509Certificate[0]); } catch (KeyStoreException kse) { return null; }
String[] s; String alias = chooseClientAlias(type, p); if (alias == null) s = new String[0]; else { s = new String[1]; s[0] = alias; } return s;
try { return (PrivateKey) ks.getKey(alias, pw); } catch (Exception e) { return null; }
return getClientAliases(type, p);