public static List<String> getServerIdentities(X509Certificate x509Certificate) {
        
        List<String> names = new ArrayList<>();
        for (CertificateIdentityMapping mapping : serverCertMapping) {
            List<String> identities = mapping.mapIdentity(x509Certificate);
            Log.debug("CertificateManager: " + mapping.name() + " returned " + identities.toString());
            if (!identities.isEmpty()) {
                names.addAll(identities);
                break;
            }
        }

        return names;
    }
Returns the identities of the remote server as defined in the specified certificate. The
identities are mapped by the classes in the "provider.serverCertIdentityMap.classList" property.
By default, the identities are defined in the subjectDN of the certificate and it can also be 
defined in the subjectAltName extensions of type "xmpp". When the extension is being used then the
identities defined in the extension are going to be returned. Otherwise, the value stored in
the subjectDN is returned.

@param x509Certificate the certificate the holds the identities of the remote server.
@return the identities of the remote server as defined in the specified certificate.
xmppserver/src/main/java/org/jivesoftware/util/CertificateManager.java