summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1999-02-27 07:29:17 +0000
committerderaadt <deraadt@openbsd.org>1999-02-27 07:29:17 +0000
commitf33ef9a856636df40d41be58a6056fee91bc13d4 (patch)
treedf6a7f9cb2a1b1aec929f303b526d1db5a3b6f17
parentsync (diff)
downloadwireguard-openbsd-f33ef9a856636df40d41be58a6056fee91bc13d4.tar.xz
wireguard-openbsd-f33ef9a856636df40d41be58a6056fee91bc13d4.zip
authkey not authp; Markus.Friedl@informatik.uni-erlangen.de
-rw-r--r--sbin/ipsecadm/ipsecadm.84
-rw-r--r--sbin/ipsecadm/ipsecadm.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/sbin/ipsecadm/ipsecadm.8 b/sbin/ipsecadm/ipsecadm.8
index 6d7c0cc9c5e..08b3e46de52 100644
--- a/sbin/ipsecadm/ipsecadm.8
+++ b/sbin/ipsecadm/ipsecadm.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ipsecadm.8,v 1.2 1999/02/25 17:43:19 deraadt Exp $
+.\" $OpenBSD: ipsecadm.8,v 1.3 1999/02/27 07:29:17 deraadt Exp $
.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
.\" All rights reserved.
.\"
@@ -337,7 +337,7 @@ Setup a SPI which uses new esp with 3des encryption and HMAC-SHA1
authentication:
.Bd -literal
ipsecadm -enc 3des -auth sha1 -spi 1001 -dst 169.20.12.2 -src 169.20.12.3
--key 638063806380638063806380638063806380638063806380 -authp 1234123412341234
+-key 638063806380638063806380638063806380638063806380 -authkey 1234123412341234
.Ed
.Pp
Setup a SPI for authentication with old ah only:
diff --git a/sbin/ipsecadm/ipsecadm.c b/sbin/ipsecadm/ipsecadm.c
index b168928c8cf..ddb1314f915 100644
--- a/sbin/ipsecadm/ipsecadm.c
+++ b/sbin/ipsecadm/ipsecadm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecadm.c,v 1.11 1999/02/26 10:04:05 angelos Exp $ */
+/* $OpenBSD: ipsecadm.c,v 1.12 1999/02/27 07:29:17 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -821,7 +821,8 @@ main(int argc, char **argv)
exit(1);
}
- if (isencauth(mode) && keyp == NULL)
+ if (((mode & (ESP_NEW | ESP_OLD)) && keyp == NULL) ||
+ ((mode & (AH_NEW | AH_OLD)) && authp == NULL))
{
fprintf(stderr, "%s: no key material specified\n", argv[0]);
exit(1);