mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
swanctl: Report PPK configuration in --list-conns
This commit is contained in:
parent
7f94528061
commit
1fb46f7119
@ -238,7 +238,7 @@ CALLBACK(conns, int,
|
||||
void *null, vici_res_t *res, char *name)
|
||||
{
|
||||
int ret;
|
||||
char *version, *reauth_time, *rekey_time, *dpd_delay;
|
||||
char *version, *reauth_time, *rekey_time, *dpd_delay, *ppk_id, *ppk_req;
|
||||
hashtable_t *ike;
|
||||
|
||||
version = vici_find_str(res, "", "%s.version", name);
|
||||
@ -282,6 +282,14 @@ CALLBACK(conns, int,
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
ppk_id = vici_find_str(res, NULL, "%s.ppk_id", name);
|
||||
ppk_req = vici_find_str(res, NULL, "%s.ppk_required", name);
|
||||
if (ppk_id || ppk_req)
|
||||
{
|
||||
printf(" ppk: %s%s%srequired\n", ppk_id ?: "", ppk_id ? ", " : "",
|
||||
!ppk_req || !streq(ppk_req, "yes") ? "not " : "");
|
||||
}
|
||||
|
||||
ret = vici_parse_cb(res, conn_sn, NULL, conn_list, ike);
|
||||
free_hashtable(ike);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user