From 53e6c3ad6e39192d41ae16db7f779cb38dc91b30 Mon Sep 17 00:00:00 2001 From: Hans-Joerg Hoexer Date: Mon, 19 Feb 2007 08:50:44 +0000 Subject: do not display empty authkey/enckey line when -k option is not specified. ok markus@ --- sbin/ipsecctl/ipsecctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin') 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 * @@ -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 -- cgit v1.2.3