Code examples for KeyStore

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
217:	mKnownServersStore.load(null, LOCAL_TRUSTSTORE_PASSWORD.toCharArray()); // necessary to initialize an empty KeyStore instance 
-
227:	knownServers.setCertificateEntry(Integer.toString(cert.hashCode()), cert); 
-
231:	knownServers.store(fos, LOCAL_TRUSTSTORE_PASSWORD.toCharArray()); 
Full Snippet Info
7
CodeRank
340:	_ks.load(null, _keystorepass); 
-
342:	_ks.setCertificateEntry(_caCertAlias, signingCert); 
343:	_ks.setKeyEntry(_caPrivKeyAlias, caPrivKey, _keypassword, new Certificate[] {signingCert}); 
-
348:	_ks.store(os, _keystorepass); 
Full Snippet Info
7
CodeRank
132:	validate(keyStore, keyStore.getCertificate(keyAlias)); 
-
169:	certAlias = keyStore.getCertificateAlias((X509Certificate)cert); 
-
173:	keyStore.setCertificateEntry(certAlias, cert); 
-
176:	certChain = keyStore.getCertificateChain(certAlias); 
Full Snippet Info
7
CodeRank
339:	ks.load(new ByteArrayInputStream(data), oldStorePass); 
-
341:	if (!ks.containsAlias("android")) 
-
346:	Key key = ks.getKey("android", oldStorePass); 
-
354:	ks.store(bOut, oldStorePass); 
Full Snippet Info
7
CodeRank
181:	mKeyStore.store(fos, KEYSTORE_PASSWORD); 
-
245:	if (mKeyStore.containsAlias(alias)) { 
-
247:	mKeyStore.deleteEntry(alias); 
-
250:	mKeyStore.setCertificateEntry(alias, peerCert); 
Full Snippet Info
6
CodeRank
56:	keyStore.load(null, password); 
-
64:	keyStore.load(input, password); 
65:	caPrivateKey = (PrivateKey) keyStore.getKey(STORE_KEY, password); 
66:	final Certificate[] chain = keyStore.getCertificateChain(STORE_KEY); 
Full Snippet Info
6
CodeRank
132:	ks.store(out, password.toCharArray()); 
Full Snippet Info
6
CodeRank
92:	keystore.load(is, password); 
93:	caKey = (PrivateKey) keystore.getKey(CA, password); 
-
98:	caCerts = cast(keystore.getCertificateChain(CA)); 
-
102:	keystore.load(null, password); 
Full Snippet Info
6
CodeRank
57:	secureStorage.load(null); 
-
59:	Log.i(TAG, "Key store initialized. Type: " + secureStorage.getType() + ""); 
60:	Log.d(TAG, "Key store size: " + secureStorage.size()); 
61:	Log.d(TAG, "Key store alises: " + secureStorage.aliases()); 
Full Snippet Info
6
CodeRank
24:	Certificate c = ks.getCertificate(alias); 
-
38:	ks.setCertificateEntry(alias, cert); 
39:	store(ks, keystore); 
Full Snippet Info
6
CodeRank
62:	keyStore.load(new FileInputStream(keystorePath), password); 
-
151:	Enumeration<String> aliases = keyStore.aliases(); 
-
154:	Certificate certificate = keyStore.getCertificate(alias); 
155:	Key key = keyStore.getKey(alias, password); 
Full Snippet Info
6
CodeRank
56:	assertEquals("Certs do not match in client keystore file", securityService.getCertificate(moduleKeyStoreAlias), clientKeyStore.getCertificate(moduleKeyStoreAlias)); 
-
60:	assertEquals("Certs do not match in module keystore file", clientKeyStore.getCertificate(moduleKeyStoreAlias), securityService.getCertificate(moduleKeyStoreAlias)); 
-
64:	assertTrue("Alias for Certificate Entry '" + certificateEntryAlias + "' should exist in " + keyStoreQualifier + " keystore file", keyStore.containsAlias(certificateEntryAlias)); 
65:	assertTrue("Alias '" + certificateEntryAlias + "' should be Certificate Entry in " + keyStoreQualifier + " keystore file", keyStore.isCertificateEntry(certificateEntryAlias)); 
66:	assertTrue("Alias for Private Key Entry '" + privateKeyEntryAlias + "' should exist in " + keyStoreQualifier + " keystore file", keyStore.containsAlias(privateKeyEntryAlias)); 
67:	assertTrue("Alias '" + privateKeyEntryAlias + "' should be Private Key Entry in " + keyStoreQualifier + " keystore file", keyStore.entryInstanceOf(privateKeyEntryAlias, KeyStore.PrivateKeyEntry.class)); 
Full Snippet Info
6
CodeRank
58:	this.credentialResolver = new KeyStoreCredentialResolver(keyStore, passwords); 
-
93:	Enumeration<String> aliases = keyStore.aliases(); 
Full Snippet Info
6
CodeRank
181:	mKeyStore.store(fos, KEYSTORE_PASSWORD); 
-
245:	if (mKeyStore.containsAlias(alias)) { 
-
247:	mKeyStore.deleteEntry(alias); 
-
250:	mKeyStore.setCertificateEntry(alias, peerCert); 
Full Snippet Info
6
CodeRank
132:	validate(keyStore, keyStore.getCertificate(keyAlias)); 
-
169:	certAlias = keyStore.getCertificateAlias((X509Certificate)cert); 
-
173:	keyStore.setCertificateEntry(certAlias, cert); 
-
176:	certChain = keyStore.getCertificateChain(certAlias); 
Full Snippet Info
6
CodeRank
162:	keyStore.store(fos, KEYSTORE_PASSWORD); 
-
218:	if (mKeyStore.containsAlias(alias)) { 
-
220:	mKeyStore.deleteEntry(alias); 
-
223:	mKeyStore.setCertificateEntry(alias, peerCert); 
Full Snippet Info
6
CodeRank
130:	validate(keyStore, keyStore.getCertificate(keyAlias)); 
-
167:	certAlias = keyStore.getCertificateAlias((X509Certificate)cert); 
-
171:	keyStore.setCertificateEntry(certAlias, cert); 
-
174:	certChain = keyStore.getCertificateChain(certAlias); 
Full Snippet Info
6
CodeRank
216:	if (keyStore.containsAlias(name)) { 
217:	keyStore.deleteEntry(name); 
Full Snippet Info
6
CodeRank
40:	X509Certificate certificate = (X509Certificate) ks.getCertificate(alias); 
41:	PrivateKey privateKey = (PrivateKey) ks.getKey(alias, senhaDoCertificado.toCharArray()); 
Full Snippet Info
6
CodeRank
21:	ks.load(keyStore, storePass.toCharArray()); 
Full Snippet Info
6
CodeRank