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

Diff for /src/usr.bin/ssh/hostfile.c between version 1.51 and 1.52

version 1.51, 2013/05/17 00:13:13 version 1.52, 2013/07/12 00:19:58
Line 61 
Line 61 
 };  };
   
 static int  static int
 extract_salt(const char *s, u_int l, char *salt, size_t salt_len)  extract_salt(const char *s, u_int l, u_char *salt, size_t salt_len)
 {  {
         char *p, *b64salt;          char *p, *b64salt;
         u_int b64len;          u_int b64len;
Line 112 
Line 112 
 {  {
         const EVP_MD *md = EVP_sha1();          const EVP_MD *md = EVP_sha1();
         HMAC_CTX mac_ctx;          HMAC_CTX mac_ctx;
         char salt[256], result[256], uu_salt[512], uu_result[512];          u_char salt[256], result[256];
           char uu_salt[512], uu_result[512];
         static char encoded[1024];          static char encoded[1024];
         u_int i, len;          u_int i, len;
   
Line 130 
Line 131 
         }          }
   
         HMAC_Init(&mac_ctx, salt, len, md);          HMAC_Init(&mac_ctx, salt, len, md);
         HMAC_Update(&mac_ctx, host, strlen(host));          HMAC_Update(&mac_ctx, (u_char *)host, strlen(host));
         HMAC_Final(&mac_ctx, result, NULL);          HMAC_Final(&mac_ctx, result, NULL);
         HMAC_cleanup(&mac_ctx);          HMAC_cleanup(&mac_ctx);
   
Line 150 
Line 151 
  */   */
   
 int  int
 hostfile_read_key(char **cpp, u_int *bitsp, Key *ret)  hostfile_read_key(char **cpp, int *bitsp, Key *ret)
 {  {
         char *cp;          char *cp;
   
Line 167 
Line 168 
   
         /* Return results. */          /* Return results. */
         *cpp = cp;          *cpp = cp;
         if (bitsp != NULL)          if (bitsp != NULL) {
                 *bitsp = key_size(ret);                  if ((*bitsp = key_size(ret)) <= 0)
                           return 0;
           }
         return 1;          return 1;
 }  }
   

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52