Make cert_validator_t.validate optional to implement

This commit is contained in:
Martin Willi
2013-02-19 14:31:18 +01:00
parent d830174e3c
commit 790e00aaa9
2 changed files with 5 additions and 0 deletions
@@ -43,6 +43,7 @@ struct cert_validator_t {
* @param pathlen the current length of the path bottom-up
* @param anchor is issuer trusted root anchor
* @param auth container for resulting authentication info
* @return TRUE if subject certificate valid
*/
bool (*validate)(cert_validator_t *this, certificate_t *subject,
certificate_t *issuer, bool online, u_int pathlen,
@@ -541,6 +541,10 @@ static bool check_certificate(private_credential_manager_t *this,
enumerator = this->validators->create_enumerator(this->validators);
while (enumerator->enumerate(enumerator, &validator))
{
if (!validator->validate)
{
continue;
}
if (!validator->validate(validator, subject, issuer,
online, pathlen, trusted, auth))
{