public Set<X509Certificate> getAllX509Certificates() throws KeyStoreException {
		HashSet<X509Certificate> result = new HashSet<>();
		Enumeration<String> enumAlias = this.keystore.aliases();
		while (enumAlias.hasMoreElements()) {
			Certificate currentCert = this.keystore.getCertificate(enumAlias.nextElement());
			if (currentCert instanceof X509Certificate) {
				LOG.debug(((X509Certificate) currentCert).getSubjectDN().getName());
				result.add((X509Certificate)currentCert);
			}
		}
		return result;
	}
public Set < X509Certificate > getAllX509Certificates ( ) throws KeyStoreException { HashSet < X509Certificate > result = new HashSet < > ( ) ; Enumeration < String > enumAlias = this . keystore . aliases ( ) ; while ( enumAlias . hasMoreElements ( ) ) { Certificate currentCert = this . keystore . getCertificate ( enumAlias . nextElement ( ) ) ; if ( currentCert instanceof X509Certificate ) { LOG . debug ( ( ( X509Certificate ) currentCert ) . getSubjectDN ( ) . getName ( ) ) ; result . add ( ( X509Certificate ) currentCert ) ; } } return result ; }
Reads all X509Certificatres from the keystore

@return Set of X509 Certificates in the keystore
@throws KeyStoreException