diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -714,7 +714,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated, | |||
714 | struct sshkey **tmp, *dup; | 714 | struct sshkey **tmp, *dup; |
715 | int r; | 715 | int r; |
716 | 716 | ||
717 | if ((r = sshkey_demote(key, &dup)) != 0) | 717 | if ((r = sshkey_from_private(key, &dup)) != 0) |
718 | fatal("%s: copy key: %s", __func__, ssh_err(r)); | 718 | fatal("%s: copy key: %s", __func__, ssh_err(r)); |
719 | sshkey_free(authctxt->auth_method_key); | 719 | sshkey_free(authctxt->auth_method_key); |
720 | authctxt->auth_method_key = dup; | 720 | authctxt->auth_method_key = dup; |
@@ -723,7 +723,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated, | |||
723 | return; | 723 | return; |
724 | 724 | ||
725 | /* If authenticated, make sure we don't accept this key again */ | 725 | /* If authenticated, make sure we don't accept this key again */ |
726 | if ((r = sshkey_demote(key, &dup)) != 0) | 726 | if ((r = sshkey_from_private(key, &dup)) != 0) |
727 | fatal("%s: copy key: %s", __func__, ssh_err(r)); | 727 | fatal("%s: copy key: %s", __func__, ssh_err(r)); |
728 | if (authctxt->nprev_keys >= INT_MAX || | 728 | if (authctxt->nprev_keys >= INT_MAX || |
729 | (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys, | 729 | (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys, |