summaryrefslogtreecommitdiff
path: root/auth2.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2018-10-19 21:29:01 +0100
committerColin Watson <cjwatson@debian.org>2018-10-19 21:29:01 +0100
commit3d246f10429fc9a37b98eabef94fe8dc7c61002b (patch)
tree1f35b42b5e5f462d35ba452e4dcfa188ce0543fd /auth2.c
parente6547182a54f0f268ee36e7c99319eeddffbaff2 (diff)
parentaede1c34243a6f7feae2fb2cb686ade5f9be6f3d (diff)
Import openssh_7.9p1.orig.tar.gz
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth2.c b/auth2.c
index ab8795895..4d19957a6 100644
--- a/auth2.c
+++ b/auth2.c
@@ -706,7 +706,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated,
706 struct sshkey **tmp, *dup; 706 struct sshkey **tmp, *dup;
707 int r; 707 int r;
708 708
709 if ((r = sshkey_demote(key, &dup)) != 0) 709 if ((r = sshkey_from_private(key, &dup)) != 0)
710 fatal("%s: copy key: %s", __func__, ssh_err(r)); 710 fatal("%s: copy key: %s", __func__, ssh_err(r));
711 sshkey_free(authctxt->auth_method_key); 711 sshkey_free(authctxt->auth_method_key);
712 authctxt->auth_method_key = dup; 712 authctxt->auth_method_key = dup;
@@ -715,7 +715,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated,
715 return; 715 return;
716 716
717 /* If authenticated, make sure we don't accept this key again */ 717 /* If authenticated, make sure we don't accept this key again */
718 if ((r = sshkey_demote(key, &dup)) != 0) 718 if ((r = sshkey_from_private(key, &dup)) != 0)
719 fatal("%s: copy key: %s", __func__, ssh_err(r)); 719 fatal("%s: copy key: %s", __func__, ssh_err(r));
720 if (authctxt->nprev_keys >= INT_MAX || 720 if (authctxt->nprev_keys >= INT_MAX ||
721 (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys, 721 (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys,