summaryrefslogtreecommitdiff
path: root/auth2-jpake.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
committerColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
commit8faf8c84430cf3c19705b1d9f8889d256e7fd1fd (patch)
treee6cb74192adb00fda5e4d1457547851d7e0d86af /auth2-jpake.c
parent328b60656f29db6306994d7498dede386ec2d1c3 (diff)
parentc41345ad7ee5a22689e2c009595e85fa27b4b39a (diff)
merge 6.3p1
Diffstat (limited to 'auth2-jpake.c')
-rw-r--r--auth2-jpake.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/auth2-jpake.c b/auth2-jpake.c
index ed0eba47b..78a6b8817 100644
--- a/auth2-jpake.c
+++ b/auth2-jpake.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-jpake.c,v 1.5 2012/12/02 20:34:09 djm Exp $ */ 1/* $OpenBSD: auth2-jpake.c,v 1.6 2013/05/17 00:13:13 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Damien Miller. All rights reserved. 3 * Copyright (c) 2008 Damien Miller. All rights reserved.
4 * 4 *
@@ -179,7 +179,7 @@ derive_rawsalt(const char *username, u_char *rawsalt, u_int len)
179 __func__, len, digest_len); 179 __func__, len, digest_len);
180 memcpy(rawsalt, digest, len); 180 memcpy(rawsalt, digest, len);
181 bzero(digest, digest_len); 181 bzero(digest, digest_len);
182 xfree(digest); 182 free(digest);
183} 183}
184 184
185/* ASCII an integer [0, 64) for inclusion in a password/salt */ 185/* ASCII an integer [0, 64) for inclusion in a password/salt */
@@ -258,7 +258,7 @@ fake_salt_and_scheme(Authctxt *authctxt, char **salt, char **scheme)
258 makesalt(22, authctxt->user)); 258 makesalt(22, authctxt->user));
259 *scheme = xstrdup("bcrypt"); 259 *scheme = xstrdup("bcrypt");
260 } 260 }
261 xfree(style); 261 free(style);
262 debug3("%s: fake %s salt for user %s: %s", 262 debug3("%s: fake %s salt for user %s: %s",
263 __func__, *scheme, authctxt->user, *salt); 263 __func__, *scheme, authctxt->user, *salt);
264} 264}
@@ -361,7 +361,7 @@ auth2_jpake_get_pwdata(Authctxt *authctxt, BIGNUM **s,
361 JPAKE_DEBUG_BN((*s, "%s: s = ", __func__)); 361 JPAKE_DEBUG_BN((*s, "%s: s = ", __func__));
362#endif 362#endif
363 bzero(secret, secret_len); 363 bzero(secret, secret_len);
364 xfree(secret); 364 free(secret);
365} 365}
366 366
367/* 367/*
@@ -403,12 +403,12 @@ auth2_jpake_start(Authctxt *authctxt)
403 403
404 bzero(hash_scheme, strlen(hash_scheme)); 404 bzero(hash_scheme, strlen(hash_scheme));
405 bzero(salt, strlen(salt)); 405 bzero(salt, strlen(salt));
406 xfree(hash_scheme); 406 free(hash_scheme);
407 xfree(salt); 407 free(salt);
408 bzero(x3_proof, x3_proof_len); 408 bzero(x3_proof, x3_proof_len);
409 bzero(x4_proof, x4_proof_len); 409 bzero(x4_proof, x4_proof_len);
410 xfree(x3_proof); 410 free(x3_proof);
411 xfree(x4_proof); 411 free(x4_proof);
412 412
413 /* Expect step 1 packet from peer */ 413 /* Expect step 1 packet from peer */
414 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_CLIENT_STEP1, 414 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_CLIENT_STEP1,
@@ -455,8 +455,8 @@ input_userauth_jpake_client_step1(int type, u_int32_t seq, void *ctxt)
455 455
456 bzero(x1_proof, x1_proof_len); 456 bzero(x1_proof, x1_proof_len);
457 bzero(x2_proof, x2_proof_len); 457 bzero(x2_proof, x2_proof_len);
458 xfree(x1_proof); 458 free(x1_proof);
459 xfree(x2_proof); 459 free(x2_proof);
460 460
461 if (!use_privsep) 461 if (!use_privsep)
462 JPAKE_DEBUG_CTX((pctx, "step 2 sending in %s", __func__)); 462 JPAKE_DEBUG_CTX((pctx, "step 2 sending in %s", __func__));
@@ -469,7 +469,7 @@ input_userauth_jpake_client_step1(int type, u_int32_t seq, void *ctxt)
469 packet_write_wait(); 469 packet_write_wait();
470 470
471 bzero(x4_s_proof, x4_s_proof_len); 471 bzero(x4_s_proof, x4_s_proof_len);
472 xfree(x4_s_proof); 472 free(x4_s_proof);
473 473
474 /* Expect step 2 packet from peer */ 474 /* Expect step 2 packet from peer */
475 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_CLIENT_STEP2, 475 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_CLIENT_STEP2,
@@ -510,7 +510,7 @@ input_userauth_jpake_client_step2(int type, u_int32_t seq, void *ctxt)
510 &pctx->h_k_sid_sessid, &pctx->h_k_sid_sessid_len)); 510 &pctx->h_k_sid_sessid, &pctx->h_k_sid_sessid_len));
511 511
512 bzero(x2_s_proof, x2_s_proof_len); 512 bzero(x2_s_proof, x2_s_proof_len);
513 xfree(x2_s_proof); 513 free(x2_s_proof);
514 514
515 if (!use_privsep) 515 if (!use_privsep)
516 JPAKE_DEBUG_CTX((pctx, "confirm sending in %s", __func__)); 516 JPAKE_DEBUG_CTX((pctx, "confirm sending in %s", __func__));