code: private boolean isCertExpired(X509Certificate cert) {
  		if (cert != null && cert.getNotAfter().before(new Date())) {
  			return true;
  		}
  		return false;
  	}
docs: Returns true if the certificate expired before the current date, otherwise false.
  
  @param cert the X.509 certificate for which expiration should be checked.
  @return true if the certificate has expired, otherwise false.