vici: list cert_policy parameter
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user