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

Diff for /src/usr.bin/ssh/authfile.c between version 1.130 and 1.131

version 1.130, 2018/07/09 21:59:10 version 1.131, 2018/09/21 12:20:12
Line 454 
Line 454 
                 return SSH_ERR_SYSTEM_ERROR;                  return SSH_ERR_SYSTEM_ERROR;
   
         while (getline(&line, &linesize, f) != -1) {          while (getline(&line, &linesize, f) != -1) {
                   sshkey_free(pub);
                   pub = NULL;
                 cp = line;                  cp = line;
   
                 /* Skip leading whitespace. */                  /* Skip leading whitespace. */
Line 472 
Line 474 
                         r = SSH_ERR_ALLOC_FAIL;                          r = SSH_ERR_ALLOC_FAIL;
                         goto out;                          goto out;
                 }                  }
                 if ((r = sshkey_read(pub, &cp)) != 0)                  switch (r = sshkey_read(pub, &cp)) {
                   case 0:
                           break;
                   case SSH_ERR_KEY_LENGTH:
                           continue;
                   default:
                         goto out;                          goto out;
                   }
                 if (sshkey_compare(key, pub) ||                  if (sshkey_compare(key, pub) ||
                     (check_ca && sshkey_is_cert(key) &&                      (check_ca && sshkey_is_cert(key) &&
                     sshkey_compare(key->cert->signature_key, pub))) {                      sshkey_compare(key->cert->signature_key, pub))) {
                         r = 0;                          r = 0;
                         goto out;                          goto out;
                 }                  }
                 sshkey_free(pub);  
                 pub = NULL;  
         }          }
         r = SSH_ERR_KEY_NOT_FOUND;          r = SSH_ERR_KEY_NOT_FOUND;
  out:   out:

Legend:
Removed from v.1.130  
changed lines
  Added in v.1.131