Make cert_validator_t.validate optional to implement
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user