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

Diff for /src/usr.bin/ssh/ssh-sk.c between version 1.29 and 1.30

version 1.29, 2020/03/06 18:25:48 version 1.30, 2020/04/28 04:02:29
Line 605 
Line 605 
         int type, alg;          int type, alg;
         struct sk_sign_response *resp = NULL;          struct sk_sign_response *resp = NULL;
         struct sshbuf *inner_sig = NULL, *sig = NULL;          struct sshbuf *inner_sig = NULL, *sig = NULL;
         uint8_t message[32];  
         struct sk_option **opts = NULL;          struct sk_option **opts = NULL;
   
         debug("%s: provider \"%s\", key %s, flags 0x%02x%s", __func__,          debug("%s: provider \"%s\", key %s, flags 0x%02x%s", __func__,
Line 640 
Line 639 
                 goto out;                  goto out;
         }          }
   
         /* hash data to be signed before it goes to the security key */          if ((r = skp->sk_sign(alg, data, datalen, key->sk_application,
         if ((r = ssh_digest_memory(SSH_DIGEST_SHA256, data, datalen,  
             message, sizeof(message))) != 0) {  
                 error("%s: hash application failed: %s", __func__, ssh_err(r));  
                 r = SSH_ERR_INTERNAL_ERROR;  
                 goto out;  
         }  
         if ((r = skp->sk_sign(alg, message, sizeof(message),  
             key->sk_application,  
             sshbuf_ptr(key->sk_key_handle), sshbuf_len(key->sk_key_handle),              sshbuf_ptr(key->sk_key_handle), sshbuf_len(key->sk_key_handle),
             key->sk_flags, pin, opts, &resp)) != 0) {              key->sk_flags, pin, opts, &resp)) != 0) {
                 debug("%s: sk_sign failed with code %d", __func__, r);                  debug("%s: sk_sign failed with code %d", __func__, r);
Line 697 
Line 688 
         r = 0;          r = 0;
  out:   out:
         sshsk_free_options(opts);          sshsk_free_options(opts);
         explicit_bzero(message, sizeof(message));  
         sshsk_free(skp);          sshsk_free(skp);
         sshsk_free_sign_response(resp);          sshsk_free_sign_response(resp);
         sshbuf_free(sig);          sshbuf_free(sig);

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30