diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2002-03-06 09:43:09 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2002-03-06 09:43:09 +0000 |
commit | b5a1c23f326e2c833e8d0ac989a89b8a14768247 (patch) | |
tree | 647b34917bf5a7bf585accb0afe90da6e7bc37f4 /sbin/isakmpd | |
parent | 2b266251eb3bbc5e2745f143e365241ea8889a60 (diff) |
Unbreak MD5 and SHA1 passphrases in policy check. From
<chris@stallion.oz.au>.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/ike_quick_mode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/ike_quick_mode.c b/sbin/isakmpd/ike_quick_mode.c index 12e9ccb55fa..d223c1032a4 100644 --- a/sbin/isakmpd/ike_quick_mode.c +++ b/sbin/isakmpd/ike_quick_mode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ike_quick_mode.c,v 1.58 2002/01/23 18:44:47 ho Exp $ */ +/* $OpenBSD: ike_quick_mode.c,v 1.59 2002/03/06 09:43:08 ho Exp $ */ /* $EOM: ike_quick_mode.c,v 1.139 2001/01/26 10:43:17 niklas Exp $ */ /* @@ -213,7 +213,7 @@ check_policy (struct exchange *exchange, struct sa *sa, struct sa *isakmp_sa) MD5 (isakmp_sa->recv_key, strlen (isakmp_sa->recv_key), hashbuf); for (i = 0; i < 16; i++) snprintf (principal[1] + 2 * i + sizeof "passphrase-md5-hex:" - 1, - 2, "%02x", hashbuf[i]); + 3, "%02x", hashbuf[i]); len = sizeof "passphrase-sha1-hex:" + 2 * 20; principal[2] = calloc (len, sizeof (char)); @@ -228,7 +228,7 @@ check_policy (struct exchange *exchange, struct sa *sa, struct sa *isakmp_sa) SHA1 (isakmp_sa->recv_key, strlen (isakmp_sa->recv_key), hashbuf); for (i = 0; i < 20; i++) snprintf (principal[2] + 2 * i + sizeof "passphrase-sha1-hex:" - 1, - 2, "%02x", hashbuf[i]); + 3, "%02x", hashbuf[i]); break; case ISAKMP_CERTENC_KEYNOTE: |