public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException {
                    if (Instant.now().isAfter(certs[0].getNotAfter().toInstant()) || Instant.now().isBefore(certs[0].getNotBefore().toInstant())) {
                        throw new CertificateException("Peer certificate is expired.");
                    }
                }
Creates a TrustManager that will blindly accept all certificates.
xmppserver/src/test/java/org/jivesoftware/openfire/session/AbstractRemoteServerDummy.java