public void checkValidity(Date date)
throws CertificateExpiredException,
CertificateNotYetValidException {
if (this.date == null) {
throw new CertificateExpiredException();
}
int result = this.date.compareTo(date);
if (result > 0) {
throw new CertificateExpiredException();
}
if (result < 0) {
throw new CertificateNotYetValidException();
}
}