[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.42 and 1.43

version 1.42, 2022/10/28 00:37:24 version 1.43, 2022/10/28 00:39:29
Line 118 
Line 118 
         return 0;          return 0;
 }  }
   
   static int
   ssh_dss_generate(struct sshkey *k, int bits)
   {
           DSA *private;
   
           if (bits != 1024)
                   return SSH_ERR_KEY_LENGTH;
           if ((private = DSA_new()) == NULL)
                   return SSH_ERR_ALLOC_FAIL;
           if (!DSA_generate_parameters_ex(private, bits, NULL, 0, NULL,
               NULL, NULL) || !DSA_generate_key(private)) {
                   DSA_free(private);
                   return SSH_ERR_LIBCRYPTO_ERROR;
           }
           k->dsa = private;
           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 281 
Line 299 
         /* .cleanup = */        ssh_dss_cleanup,          /* .cleanup = */        ssh_dss_cleanup,
         /* .equal = */          ssh_dss_equal,          /* .equal = */          ssh_dss_equal,
         /* .ssh_serialize_public = */ ssh_dss_serialize_public,          /* .ssh_serialize_public = */ ssh_dss_serialize_public,
           /* .generate = */       ssh_dss_generate,
 };  };
   
 const struct sshkey_impl sshkey_dss_impl = {  const struct sshkey_impl sshkey_dss_impl = {

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