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

Diff for /src/usr.bin/signify/signify.c between version 1.82 and 1.83

version 1.82, 2014/05/14 15:56:41 version 1.83, 2014/05/14 16:02:34
Line 531 
Line 531 
 }  }
   
 #ifndef VERIFYONLY  #ifndef VERIFYONLY
   #define HASHBUFSIZE 224
 struct checksum {  struct checksum {
         char file[1024];          char file[1024];
         char hash[224];          char hash[HASHBUFSIZE];
         char algo[32];          char algo[32];
 };  };
   
 static void  static void
 recodehash(char *hash)  recodehash(char *hash)
 {  {
         uint8_t data[112];          uint8_t data[HASHBUFSIZE / 2];
         int i, rv;          int i, rv;
   
         if (strlen(hash) == SHA256_DIGEST_STRING_LENGTH ||          if (strlen(hash) == SHA256_DIGEST_STRING_LENGTH ||
Line 549 
Line 550 
         if ((rv = b64_pton(hash, data, sizeof(data))) == -1)          if ((rv = b64_pton(hash, data, sizeof(data))) == -1)
                 errx(1, "invalid base64 encoding");                  errx(1, "invalid base64 encoding");
         for (i = 0; i < rv; i++)          for (i = 0; i < rv; i++)
                 snprintf(hash + i * 2, 1024 - i * 2, "%2.2x", data[i]);                  snprintf(hash + i * 2, HASHBUFSIZE - i * 2, "%2.2x", data[i]);
 }  }
   
 static void  static void

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83