(verify_crl): set error strings.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21864 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-08-08 10:32:50 +00:00
parent c66758fedd
commit cb9107c345

View File

@@ -393,15 +393,24 @@ verify_crl(hx509_context context,
int ret; int ret;
t = _hx509_Time2time_t(&crl->tbsCertList.thisUpdate); t = _hx509_Time2time_t(&crl->tbsCertList.thisUpdate);
if (t > time_now) if (t > time_now) {
hx509_set_error_string(context, HX509_CRL_USED_BEFORE_TIME,
"CRL used before time");
return HX509_CRL_USED_BEFORE_TIME; return HX509_CRL_USED_BEFORE_TIME;
}
if (crl->tbsCertList.nextUpdate == NULL) if (crl->tbsCertList.nextUpdate == NULL) {
hx509_set_error_string(context, HX509_CRL_INVALID_FORMAT,
"CRL missing nextUpdate");
return HX509_CRL_INVALID_FORMAT; return HX509_CRL_INVALID_FORMAT;
}
t = _hx509_Time2time_t(crl->tbsCertList.nextUpdate); t = _hx509_Time2time_t(crl->tbsCertList.nextUpdate);
if (t < time_now) if (t < time_now) {
hx509_set_error_string(context, HX509_CRL_USED_AFTER_TIME,
"CRL used after time");
return HX509_CRL_USED_AFTER_TIME; return HX509_CRL_USED_AFTER_TIME;
}
_hx509_query_clear(&q); _hx509_query_clear(&q);