summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2001-08-16 13:27:04 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2001-08-16 13:27:04 +0000
commit9b89de81bc69e152d692ab7612f1898e6716656d (patch)
treea7d492524d65668d72a3f64013e6e7748aad75fa
parenta89ec2fab3d20f5961a02be7343f4ba75b4f9fe4 (diff)
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: