Always pass auth info to validate(), use pathlen to check for user certificate

This commit is contained in:
Martin Willi
2011-01-05 16:46:04 +01:00
parent 98ef286580
commit 09e319d419
3 changed files with 9 additions and 7 deletions
@@ -576,7 +576,8 @@ METHOD(cert_validator_t, validate, bool,
{
DBG1(DBG_CFG, "checking certificate status of \"%Y\"",
subject->get_subject(subject));
switch (check_ocsp((x509_t*)subject, (x509_t*)issuer, auth))
switch (check_ocsp((x509_t*)subject, (x509_t*)issuer,
pathlen ? NULL : auth))
{
case VALIDATION_GOOD:
DBG1(DBG_CFG, "certificate status is good");
@@ -594,7 +595,8 @@ METHOD(cert_validator_t, validate, bool,
DBG1(DBG_CFG, "ocsp check failed, fallback to crl");
break;
}
switch (check_crl((x509_t*)subject, (x509_t*)issuer, auth))
switch (check_crl((x509_t*)subject, (x509_t*)issuer,
pathlen ? NULL : auth))
{
case VALIDATION_GOOD:
DBG1(DBG_CFG, "certificate status is good");