diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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, |