public Map<String, X509Certificate> getAllCertificates() throws KeyStoreException
    {
        final Map<String, X509Certificate> results = new HashMap<>();

        for ( final String alias : Collections.list( store.aliases() ) )
        {
            final Certificate certificate = store.getCertificate( alias );
            if ( !( certificate instanceof X509Certificate ) )
            {
                continue;
            }

            results.put( alias, (X509Certificate) certificate );
        }

        return results;
    }
Returns a collection of all x.509 certificates in this store. Certificates returned by this method can be of any
state (eg: invalid, on a revocation list, etc).

@return A collection (possibly empty, never null) of all certificates in this store, mapped by their alias.
@throws KeyStoreException if a keystore has not been initialized
xmppserver/src/main/java/org/jivesoftware/openfire/keystore/CertificateStore.java