public synchronized boolean containsDomainCertificate() throws CertificateStoreConfigException
    {
        final String domainName = XMPPServer.getInstance().getServerInfo().getXMPPDomain();

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

                for ( String identity : CertificateManager.getServerIdentities( (X509Certificate) certificate ) )
                {
                    if ( DNSUtil.isNameCoveredByPattern( domainName, identity ) )
                    {
                        return true;
                    }
                }
            }
            return false;
        }
        catch ( KeyStoreException e )
        {
            throw new CertificateStoreConfigException( "An exception occurred while searching for certificates that match the Openfire domain.", e );
        }
    }
Checks if the store contains a certificate of a particular algorithm that matches the domain of this
XMPP service. This method will not distinguish between self-signed and non-self-signed certificates.

@return {@code true} if the store contains a certificate of a particular algorithm that matches the domain of this XMPP service, otherwise {@code false}
@throws CertificateStoreConfigException if there was a problem creating the certificate
xmppserver/src/main/java/org/jivesoftware/openfire/keystore/IdentityStore.java