summaryrefslogtreecommitdiff
path: root/sbin/ipsecctl/ipsecctl.c
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2007-02-19 08:50:44 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2007-02-19 08:50:44 +0000
commit53e6c3ad6e39192d41ae16db7f779cb38dc91b30 (patch)
treec282480be88f385a565d664cd773f64a1172bcdc /sbin/ipsecctl/ipsecctl.c
parent53cd3e3d3e539174eb930334bb3aff4d1063b446 (diff)
do not display empty authkey/enckey line when -k option is not
specified. ok markus@
Diffstat (limited to 'sbin/ipsecctl/ipsecctl.c')
-rw-r--r--sbin/ipsecctl/ipsecctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ipsecctl/ipsecctl.c b/sbin/ipsecctl/ipsecctl.c
index bffe255fa0f..df25bc2b09d 100644
--- a/sbin/ipsecctl/ipsecctl.c
+++ b/sbin/ipsecctl/ipsecctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecctl.c,v 1.66 2007/01/10 13:45:01 jmc Exp $ */
+/* $OpenBSD: ipsecctl.c,v 1.67 2007/02/19 08:50:43 hshoexer Exp $ */
/*
* Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -384,7 +384,7 @@ ipsecctl_print_sa(struct ipsec_rule *r, int opts)
if (r->xfs && r->xfs->compxf)
printf(" comp %s", r->xfs->compxf->name);
}
- if (r->authkey) {
+ if (r->authkey && (opts & IPSECCTL_OPT_SHOWKEY)) {
if (r->satype == IPSEC_TCPMD5)
printf(" ");
else
@@ -392,7 +392,7 @@ ipsecctl_print_sa(struct ipsec_rule *r, int opts)
printf("authkey 0x");
ipsecctl_print_key(r->authkey);
}
- if (r->enckey) {
+ if (r->enckey && (opts & IPSECCTL_OPT_SHOWKEY)) {
if (r->satype == IPSEC_TCPMD5)
printf(" ");
else