1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::certificate::*;
use crate::validate::*;

use extensions::X509ExtensionsValidator;

#[derive(Debug)]
pub struct X509CertificateValidator;

impl<'a> Validator<'a> for X509CertificateValidator {
    type Item = X509Certificate<'a>;

    fn validate<L: Logger>(&self, item: &'a Self::Item, l: &'_ mut L) -> bool {
        let mut res = true;
        res &= X509ExtensionsValidator.validate(&item.extensions(), l);
        res
    }
}