[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.9 and 1.10

version 1.9, 2022/10/28 00:39:29 version 1.10, 2022/10/28 00:41:17
Line 79 
Line 79 
         return 0;          return 0;
 }  }
   
   static int
   ssh_xmss_copy_public(const struct sshkey *from, struct sshkey *to)
   {
           int r = SSH_ERR_INTERNAL_ERROR;
           u_int32_t left;
           size_t pklen;
   
           if ((r = sshkey_xmss_init(to, from->xmss_name)) != 0)
                   return r;
           if (from->xmss_pk == NULL)
                   return 0; /* XXX SSH_ERR_INTERNAL_ERROR ? */
   
           if ((pklen = sshkey_xmss_pklen(from)) == 0 ||
               sshkey_xmss_pklen(to) != pklen)
                   return SSH_ERR_INTERNAL_ERROR;
           if ((to->xmss_pk = malloc(pklen)) == NULL)
                   return SSH_ERR_ALLOC_FAIL;
           memcpy(to->xmss_pk, from->xmss_pk, pklen);
           /* simulate number of signatures left on pubkey */
           left = sshkey_xmss_signatures_left(from);
           if (left)
                   sshkey_xmss_enable_maxsign(to, left);
           return 0;
   }
   
 int  int
 ssh_xmss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,  ssh_xmss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
     const u_char *data, size_t datalen, u_int compat)      const u_char *data, size_t datalen, u_int compat)
Line 234 
Line 259 
         /* .equal = */          ssh_xmss_equal,          /* .equal = */          ssh_xmss_equal,
         /* .ssh_serialize_public = */ ssh_xmss_serialize_public,          /* .ssh_serialize_public = */ ssh_xmss_serialize_public,
         /* .generate = */       sshkey_xmss_generate_private_key,          /* .generate = */       sshkey_xmss_generate_private_key,
           /* .copy_public = */    ssh_xmss_copy_public,
 };  };
   
 const struct sshkey_impl sshkey_xmss_impl = {  const struct sshkey_impl sshkey_xmss_impl = {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10