* @param subject subject certificate to check
* @param issuer issuer of subject
* @param online wheter to do online revocation checking
- * @param pathlen the current length of the path up to the root CA
+ * @param pathlen the current length of the path bottom-up
+ * @param anchor is issuer trusted root anchor
* @param auth container for resulting authentication info
*/
bool (*validate)(cert_validator_t *this, certificate_t *subject,
certificate_t *issuer, bool online, int pathlen,
- auth_cfg_t *auth);
+ bool anchor, auth_cfg_t *auth);
};
#endif /** CERT_VALIDATOR_H_ @}*/
* check a certificate for its lifetime
*/
static bool check_certificate(private_credential_manager_t *this,
- certificate_t *subject, certificate_t *issuer,
- bool online, int pathlen, auth_cfg_t *auth)
+ certificate_t *subject, certificate_t *issuer, bool online,
+ int pathlen, bool trusted, auth_cfg_t *auth)
{
time_t not_before, not_after;
cert_validator_t *validator;
while (enumerator->enumerate(enumerator, &validator))
{
if (!validator->validate(validator, subject, issuer,
- online, pathlen, auth))
+ online, pathlen, trusted, auth))
{
enumerator->destroy(enumerator);
return FALSE;
break;
}
}
- if (!check_certificate(this, current, issuer, online, pathlen, auth))
+ if (!check_certificate(this, current, issuer, online,
+ pathlen, trusted, auth))
{
trusted = FALSE;
issuer->destroy(issuer);
METHOD(cert_validator_t, validate, bool,
private_constraints_validator_t *this, certificate_t *subject,
- certificate_t *issuer, bool online, int pathlen, auth_cfg_t *auth)
+ certificate_t *issuer, bool online, int pathlen, bool anchor,
+ auth_cfg_t *auth)
{
if (issuer->get_type(issuer) == CERT_X509 &&
subject->get_type(subject) == CERT_X509)
METHOD(cert_validator_t, validate, bool,
private_revocation_validator_t *this, certificate_t *subject,
- certificate_t *issuer, bool online, int pathlen, auth_cfg_t *auth)
+ certificate_t *issuer, bool online, int pathlen, bool anchor,
+ auth_cfg_t *auth)
{
if (subject->get_type(subject) == CERT_X509 &&
issuer->get_type(issuer) == CERT_X509 &&