vici: list cert_policy parameter

This commit is contained in:
Andreas Steffen
2018-06-22 10:39:40 +02:00
parent 424de401b4
commit ef4a63524f
3 changed files with 19 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
* Copyright (C) 2014 revosec AG
*
* Copyright (C) 2015-2017 Tobias Brunner
* Copyright (C) 2015-2016 Andreas Steffen
* Copyright (C) 2015-2018 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
+13 -1
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015-2017 Tobias Brunner
* Copyright (C) 2015 Andreas Steffen
* Copyright (C) 2015-2018 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* Copyright (C) 2014 Martin Willi
@@ -737,6 +737,18 @@ static void build_auth_cfgs(peer_cfg_t *peer_cfg, bool local, vici_builder_t *b)
rules->destroy(rules);
b->end_list(b);
b->begin_list(b, "cert_policy");
rules = auth->create_enumerator(auth);
while (rules->enumerate(rules, &rule, &v))
{
if (rule == AUTH_RULE_CERT_POLICY)
{
b->add_li(b, "%s", v.str);
}
}
rules->destroy(rules);
b->end_list(b);
b->begin_list(b, "certs");
rules = auth->create_enumerator(auth);
while (rules->enumerate(rules, &rule, &v))
+5 -1
View File
@@ -2,7 +2,7 @@
* Copyright (C) 2014 Martin Willi
* Copyright (C) 2014 revosec AG
*
* Copyright (C) 2016 Andreas Steffen
* Copyright (C) 2016-2018 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
@@ -199,6 +199,10 @@ CALLBACK(conn_sn, int,
{
printf(" groups: %s\n", auth->get(auth, "groups"));
}
if (auth->get(auth, "cert_policy"))
{
printf(" cert policy: %s\n", auth->get(auth, "cert_policy"));
}
if (auth->get(auth, "certs"))
{
printf(" certs: %s\n", auth->get(auth, "certs"));