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

Diff for /src/usr.bin/ssh/ssh-rsa.c between version 1.43 and 1.44

version 1.43, 2010/07/13 23:13:16 version 1.44, 2010/07/16 14:07:35
Line 208 
Line 208 
     u_char *sigbuf, u_int siglen, RSA *rsa)      u_char *sigbuf, u_int siglen, RSA *rsa)
 {  {
         u_int ret, rsasize, oidlen = 0, hlen = 0;          u_int ret, rsasize, oidlen = 0, hlen = 0;
         int len;          int len, oidmatch, hashmatch;
         const u_char *oid = NULL;          const u_char *oid = NULL;
         u_char *decrypted = NULL;          u_char *decrypted = NULL;
   
Line 247 
Line 247 
                 error("bad decrypted len: %d != %d + %d", len, hlen, oidlen);                  error("bad decrypted len: %d != %d + %d", len, hlen, oidlen);
                 goto done;                  goto done;
         }          }
         if (timingsafe_bcmp(decrypted, oid, oidlen) != 0) {          oidmatch = timingsafe_bcmp(decrypted, oid, oidlen) == 0;
           hashmatch = timingsafe_bcmp(decrypted + oidlen, hash, hlen) == 0;
           if (!oidmatch) {
                 error("oid mismatch");                  error("oid mismatch");
                 goto done;                  goto done;
         }          }
         if (timingsafe_bcmp(decrypted + oidlen, hash, hlen) != 0) {          if (!hashmatch) {
                 error("hash mismatch");                  error("hash mismatch");
                 goto done;                  goto done;
         }          }

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