diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2000-03-28 14:30:52 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2000-03-28 14:30:52 +0000 |
commit | 960b8dc44c2c4cf7be8d514a15818fc433f269de (patch) | |
tree | ae4a3aff8129f6111fc2bef5f0bf397e9d73b3fc /sbin | |
parent | 4f46f6f3916ddaa62b6b0f76011a4c4f16118f5f (diff) |
fix sanity checks to allow authentication-only ESP
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipsecadm/ipsecadm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/ipsecadm/ipsecadm.c b/sbin/ipsecadm/ipsecadm.c index ea7ecb0e388..b732e8eb398 100644 --- a/sbin/ipsecadm/ipsecadm.c +++ b/sbin/ipsecadm/ipsecadm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsecadm.c,v 1.32 2000/02/08 12:50:25 itojun Exp $ */ +/* $OpenBSD: ipsecadm.c,v 1.33 2000/03/28 14:30:51 jason Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -1115,9 +1115,10 @@ main(int argc, char **argv) } /* Sanity checks */ - if ((mode & (ESP_NEW | ESP_OLD)) && enc == 0) + if ((mode & (ESP_NEW | ESP_OLD)) && enc == 0 && auth == 0) { - fprintf(stderr, "%s: no encryption algorithm specified\n", argv[0]); + fprintf(stderr, "%s: no encryption or authentication algorithm " + "specified\n", argv[0]); exit(1); } @@ -1128,7 +1129,7 @@ main(int argc, char **argv) exit(1); } - if (((mode & (ESP_NEW | ESP_OLD)) && keyp == NULL) || + if (((mode & (ESP_NEW | ESP_OLD)) && enc && keyp == NULL) || ((mode & (AH_NEW | AH_OLD)) && authp == NULL)) { fprintf(stderr, "%s: no key material specified\n", argv[0]); |