[BACK]Return to authfd.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/authfd.c between version 1.127 and 1.128

version 1.127, 2021/01/26 00:46:17 version 1.128, 2021/12/19 22:08:48
Line 649 
Line 649 
         sshbuf_free(msg);          sshbuf_free(msg);
         return r;          return r;
 }  }
   
   /* Binds a session ID to a hostkey via the initial KEX signature. */
   int
   ssh_agent_bind_hostkey(int sock, const struct sshkey *key,
       const struct sshbuf *session_id, const struct sshbuf *signature,
       int forwarding)
   {
           struct sshbuf *msg;
           int r;
   
           if (key == NULL || session_id == NULL || signature == NULL)
                   return SSH_ERR_INVALID_ARGUMENT;
           if ((msg = sshbuf_new()) == NULL)
                   return SSH_ERR_ALLOC_FAIL;
           if ((r = sshbuf_put_u8(msg, SSH_AGENTC_EXTENSION)) != 0 ||
               (r = sshbuf_put_cstring(msg, "session-bind@openssh.com")) != 0 ||
               (r = sshkey_puts(key, msg)) != 0 ||
               (r = sshbuf_put_stringb(msg, session_id)) != 0 ||
               (r = sshbuf_put_stringb(msg, signature)) != 0 ||
               (r = sshbuf_put_u8(msg, forwarding ? 1 : 0)) != 0)
                   goto out;
           if ((r = ssh_request_reply_decode(sock, msg)) != 0)
                   goto out;
           /* success */
           r = 0;
    out:
           sshbuf_free(msg);
           return r;
   }

Legend:
Removed from v.1.127  
changed lines
  Added in v.1.128