public boolean isServerTrusted(X509Certificate[] cert) {
            try {
                cert[0].checkValidity();
                return true;
            }
            catch (CertificateExpiredException e) {
                return false;
            }
            catch (CertificateNotYetValidException e) {
                return false;
            }
        }
SSLSocketFactory that accepts any certificate chain and also accepts expired
certificates.

@author Matt Tucker
xmppserver/src/main/java/org/jivesoftware/util/SimpleSSLSocketFactory.java