[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.18 and 1.18.4.1

version 1.18, 2003/02/12 09:33:04 version 1.18.4.1, 2004/02/28 03:51:34
Line 39 
Line 39 
 #define SIGBLOB_LEN     (2*INTBLOB_LEN)  #define SIGBLOB_LEN     (2*INTBLOB_LEN)
   
 int  int
 ssh_dss_sign(Key *key, u_char **sigp, u_int *lenp,  ssh_dss_sign(const Key *key, u_char **sigp, u_int *lenp,
     u_char *data, u_int datalen)      const u_char *data, u_int datalen)
 {  {
         DSA_SIG *sig;          DSA_SIG *sig;
         const EVP_MD *evp_md = EVP_sha1();          const EVP_MD *evp_md = EVP_sha1();
Line 101 
Line 101 
         return 0;          return 0;
 }  }
 int  int
 ssh_dss_verify(Key *key, u_char *signature, u_int signaturelen,  ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen,
     u_char *data, u_int datalen)      const u_char *data, u_int datalen)
 {  {
         DSA_SIG *sig;          DSA_SIG *sig;
         const EVP_MD *evp_md = EVP_sha1();          const EVP_MD *evp_md = EVP_sha1();
Line 119 
Line 119 
   
         /* fetch signature */          /* fetch signature */
         if (datafellows & SSH_BUG_SIGBLOB) {          if (datafellows & SSH_BUG_SIGBLOB) {
                 sigblob = signature;                  sigblob = xmalloc(signaturelen);
                   memcpy(sigblob, signature, signaturelen);
                 len = signaturelen;                  len = signaturelen;
         } else {          } else {
                 /* ietf-drafts */                  /* ietf-drafts */
Line 159 
Line 160 
         BN_bin2bn(sigblob, INTBLOB_LEN, sig->r);          BN_bin2bn(sigblob, INTBLOB_LEN, sig->r);
         BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s);          BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s);
   
         if (!(datafellows & SSH_BUG_SIGBLOB)) {          /* clean up */
                 memset(sigblob, 0, len);          memset(sigblob, 0, len);
                 xfree(sigblob);          xfree(sigblob);
         }  
   
         /* sha1 the data */          /* sha1 the data */
         EVP_DigestInit(&md, evp_md);          EVP_DigestInit(&md, evp_md);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.18.4.1