diff options
author | 2002-03-06 09:43:08 +0000 | |
---|---|---|
committer | 2002-03-06 09:43:08 +0000 | |
commit | 312de9769adafd39a0dc2a5e00452850655a2a7a (patch) | |
tree | 8023551af7164951d4767938c1f2c2a4e4c3ee1d | |
parent | OpenSSH_3.1 (diff) | |
download | wireguard-openbsd-312de9769adafd39a0dc2a5e00452850655a2a7a.tar.xz wireguard-openbsd-312de9769adafd39a0dc2a5e00452850655a2a7a.zip |
Unbreak MD5 and SHA1 passphrases in policy check. From
<chris@stallion.oz.au>.
-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: |