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

Diff for /src/usr.bin/ssh/ssh-dss.c between version 1.41 and 1.42

version 1.41, 2022/10/28 00:36:31 version 1.42, 2022/10/28 00:37:24
Line 94 
Line 94 
         return 1;          return 1;
 }  }
   
   static int
   ssh_dss_serialize_public(const struct sshkey *key, struct sshbuf *b,
       const char *typename, enum sshkey_serialize_rep opts)
   {
           int r;
           const BIGNUM *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key;
   
           if (key->dsa == NULL)
                   return SSH_ERR_INVALID_ARGUMENT;
           DSA_get0_pqg(key->dsa, &dsa_p, &dsa_q, &dsa_g);
           DSA_get0_key(key->dsa, &dsa_pub_key, NULL);
           if (dsa_p == NULL || dsa_q == NULL ||
               dsa_g == NULL || dsa_pub_key == NULL)
                   return SSH_ERR_INTERNAL_ERROR;
           if ((r = sshbuf_put_cstring(b, typename)) != 0 ||
               (r = sshbuf_put_bignum2(b, dsa_p)) != 0 ||
               (r = sshbuf_put_bignum2(b, dsa_q)) != 0 ||
               (r = sshbuf_put_bignum2(b, dsa_g)) != 0 ||
               (r = sshbuf_put_bignum2(b, dsa_pub_key)) != 0)
                   return r;
   
           return 0;
   }
   
 int  int
 ssh_dss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,  ssh_dss_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 256 
Line 280 
         /* .alloc = */          ssh_dss_alloc,          /* .alloc = */          ssh_dss_alloc,
         /* .cleanup = */        ssh_dss_cleanup,          /* .cleanup = */        ssh_dss_cleanup,
         /* .equal = */          ssh_dss_equal,          /* .equal = */          ssh_dss_equal,
           /* .ssh_serialize_public = */ ssh_dss_serialize_public,
 };  };
   
 const struct sshkey_impl sshkey_dss_impl = {  const struct sshkey_impl sshkey_dss_impl = {

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42