summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorho <ho@openbsd.org>2001-08-16 13:27:03 +0000
committerho <ho@openbsd.org>2001-08-16 13:27:03 +0000
commit33e2b9ebae404c50d3c0ec629ea2a8455fbd55ac (patch)
tree768d8d0676b0db44be2ac26c0211f220c00751d1
parentstate that this skeleton file is in the public domain. (diff)
downloadwireguard-openbsd-33e2b9ebae404c50d3c0ec629ea2a8455fbd55ac.tar.xz
wireguard-openbsd-33e2b9ebae404c50d3c0ec629ea2a8455fbd55ac.zip
ISAKMP ID type offset was wrong.
-rw-r--r--sbin/isakmpd/ike_auth.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/isakmpd/ike_auth.c b/sbin/isakmpd/ike_auth.c
index 5f6c2a81231..cf84d45f8ca 100644
--- a/sbin/isakmpd/ike_auth.c
+++ b/sbin/isakmpd/ike_auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike_auth.c,v 1.54 2001/08/15 13:06:53 ho Exp $ */
+/* $OpenBSD: ike_auth.c,v 1.55 2001/08/16 13:27:03 ho Exp $ */
/* $EOM: ike_auth.c,v 1.59 2000/11/21 00:21:31 angelos Exp $ */
/*
@@ -1211,6 +1211,10 @@ get_raw_key_from_file (int type, u_int8_t *id, size_t id_len, RSA **rsa)
filename[FILENAME_MAX - 1] = '\0';
base = filename + strlen (filename) - 1;
+ /* Exchanges (and SAs) don't carry the ID in ISAKMP form */
+ id -= ISAKMP_ID_TYPE_OFF;
+ id_len += ISAKMP_ID_TYPE_OFF;
+
switch (GET_ISAKMP_ID_TYPE (id))
{
case IPSEC_ID_IPV4_ADDR: