summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/addrblock/addrblock_validator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/plugins/addrblock/addrblock_validator.c')
-rw-r--r--src/libcharon/plugins/addrblock/addrblock_validator.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcharon/plugins/addrblock/addrblock_validator.c b/src/libcharon/plugins/addrblock/addrblock_validator.c
index 65f4ed08c..372c978a2 100644
--- a/src/libcharon/plugins/addrblock/addrblock_validator.c
+++ b/src/libcharon/plugins/addrblock/addrblock_validator.c
@@ -94,7 +94,12 @@ METHOD(cert_validator_t, validate, bool,
if (subject->get_type(subject) == CERT_X509 &&
issuer->get_type(issuer) == CERT_X509)
{
- return check_addrblock((x509_t*)subject, (x509_t*)issuer);
+ if (!check_addrblock((x509_t*)subject, (x509_t*)issuer))
+ {
+ lib->credmgr->call_hook(lib->credmgr, CRED_HOOK_POLICY_VIOLATION,
+ subject);
+ return FALSE;
+ }
}
return TRUE;
}