Lines Matching refs:ks
59 KeyStore ks = KeyStore.getInstance("PKCS11", p);
60 ks.load(null, password);
61 for (String alias : aliases(ks)) {
63 ks.deleteEntry(alias);
90 private static List<String> aliases(KeyStore ks) throws KeyStoreException {
91 return Collections.list(ks.aliases());
105 KeyStore ks = KeyStore.getInstance("PKCS11", p);
106 ks.load(null, null);
107 if (ks.size() != 0) {
113 ks.setKeyEntry(ALIAS1, key, null, chain);
114 aliases = aliases(ks);
122 PrivateKey key2 = (PrivateKey)ks.getKey(ALIAS1, null);
124 X509Certificate[] chain2 = (X509Certificate[])ks.getCertificateChain(ALIAS1);
134 ks.deleteEntry(ALIAS1);
135 if (ks.size() != 0) {
145 ks.setKeyEntry(ALIAS2, key3, null, chain);
146 aliases = aliases(ks);
154 PrivateKey key4 = (PrivateKey)ks.getKey(ALIAS2, null);
156 X509Certificate[] chain4 = (X509Certificate[])ks.getCertificateChain(ALIAS2);
163 ks.setKeyEntry(ALIAS3, key3, null, chain);
164 aliases = aliases(ks);
172 PrivateKey key5 = (PrivateKey)ks.getKey(ALIAS3, null);
174 X509Certificate[] chain5 = (X509Certificate[])ks.getCertificateChain(ALIAS3);
180 ks.deleteEntry(ALIAS3);
181 if (ks.size() != 0) {