@Override
    public void checkServerTrusted( X509Certificate[] chain, String authType ) throws CertificateException
    {
        // Find and use the end entity as the selector for verification.
        final X509Certificate endEntityCert = CertificateUtils.identifyEndEntityCertificate( Arrays.asList( chain ) );
        final X509CertSelector selector = new X509CertSelector();
        selector.setCertificate( endEntityCert );

        try
        {
            checkChainTrusted( selector, chain );
        }
        catch ( InvalidAlgorithmParameterException | NoSuchAlgorithmException | CertPathBuilderException ex )
        {
            throw new CertificateException( ex );
        }
    }
The set of trusted issuers from the trust store. Note that these certificates are not validated. It is assumed
that this set can be long-lived. Time-based validation should occur close to the actual usage / invocation.
xmppserver/src/main/java/org/jivesoftware/openfire/keystore/OpenfireX509TrustManager.java