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

Diff for /src/usr.bin/ssh/ssh-xmss.c between version 1.3 and 1.4

version 1.3, 2020/10/18 11:32:02 version 1.4, 2020/10/19 22:49:23
Line 59 
Line 59 
         smlen = slen = datalen + required_siglen;          smlen = slen = datalen + required_siglen;
         if ((sig = malloc(slen)) == NULL)          if ((sig = malloc(slen)) == NULL)
                 return SSH_ERR_ALLOC_FAIL;                  return SSH_ERR_ALLOC_FAIL;
         if ((r = sshkey_xmss_get_state(key, error)) != 0)          if ((r = sshkey_xmss_get_state(key, 1)) != 0)
                 goto out;                  goto out;
         if ((ret = xmss_sign(key->xmss_sk, sshkey_xmss_bds_state(key), sig, &smlen,          if ((ret = xmss_sign(key->xmss_sk, sshkey_xmss_bds_state(key), sig, &smlen,
             data, datalen, sshkey_xmss_params(key))) != 0 || smlen <= datalen) {              data, datalen, sshkey_xmss_params(key))) != 0 || smlen <= datalen) {
Line 87 
Line 87 
         /* success */          /* success */
         r = 0;          r = 0;
  out:   out:
         if ((ret = sshkey_xmss_update_state(key, error)) != 0) {          if ((ret = sshkey_xmss_update_state(key, 1)) != 0) {
                 /* discard signature since we cannot update the state */                  /* discard signature since we cannot update the state */
                 if (r == 0 && sigp != NULL && *sigp != NULL) {                  if (r == 0 && sigp != NULL && *sigp != NULL) {
                         explicit_bzero(*sigp, len);                          explicit_bzero(*sigp, len);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4