diff options
author | Rob Austein <sra@hactrn.net> | 2014-02-27 18:51:05 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-02-27 18:51:05 +0000 |
commit | 54c3894551c7b6a4baa6f8c409507482e76735ef (patch) | |
tree | f5d7bbdbba01cef9b9425fbaf2f57942cba2289d /rcynic | |
parent | f1471c129737707b71f481941904e21013236d99 (diff) |
More router certificate checks.
svn path=/trunk/; revision=5689
Diffstat (limited to 'rcynic')
-rw-r--r-- | rcynic/rcynic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rcynic/rcynic.c b/rcynic/rcynic.c index 3cdd2190..5e90df89 100644 --- a/rcynic/rcynic.c +++ b/rcynic/rcynic.c @@ -3850,7 +3850,8 @@ static int check_x509(rcynic_ctx_t *rc, if (x->rfc3779_addr) { ex_count--; - if ((loc = X509_get_ext_by_NID(x, NID_sbgp_ipAddrBlock, -1)) < 0 || + if (routercert || + (loc = X509_get_ext_by_NID(x, NID_sbgp_ipAddrBlock, -1)) < 0 || !X509_EXTENSION_get_critical(X509_get_ext(x, loc)) || !v3_addr_is_canonical(x->rfc3779_addr) || sk_IPAddressFamily_num(x->rfc3779_addr) == 0) { @@ -3877,7 +3878,8 @@ static int check_x509(rcynic_ctx_t *rc, !X509_EXTENSION_get_critical(X509_get_ext(x, loc)) || !v3_asid_is_canonical(x->rfc3779_asid) || x->rfc3779_asid->asnum == NULL || - x->rfc3779_asid->rdi != NULL) { + x->rfc3779_asid->rdi != NULL || + (routercert && x->rfc3779_asid->asnum->type == ASIdentifierChoice_inherit)) { log_validation_status(rc, uri, bad_asidentifiers, generation); goto done; } |