[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.120 and 1.121

version 1.120, 2015/12/11 04:21:11 version 1.121, 2016/04/09 12:39:30
Line 145 
Line 145 
         struct sshbuf *b = NULL;          struct sshbuf *b = NULL;
         int r;          int r;
   
         *keyp = NULL;          if (keyp != NULL)
                   *keyp = NULL;
         if (commentp != NULL)          if (commentp != NULL)
                 *commentp = NULL;                  *commentp = NULL;
   
Line 195 
Line 196 
 {  {
         int fd, r;          int fd, r;
   
         *keyp = NULL;          if (keyp != NULL)
                   *keyp = NULL;
         if (commentp != NULL)          if (commentp != NULL)
                 *commentp = NULL;                  *commentp = NULL;
   
Line 226 
Line 228 
         struct sshbuf *buffer = NULL;          struct sshbuf *buffer = NULL;
         int r;          int r;
   
           if (keyp != NULL)
                   *keyp = NULL;
         if ((buffer = sshbuf_new()) == NULL) {          if ((buffer = sshbuf_new()) == NULL) {
                 r = SSH_ERR_ALLOC_FAIL;                  r = SSH_ERR_ALLOC_FAIL;
                 goto out;                  goto out;
Line 250 
Line 254 
         struct sshbuf *buffer = NULL;          struct sshbuf *buffer = NULL;
         int r, fd;          int r, fd;
   
         *keyp = NULL;          if (keyp != NULL)
                   *keyp = NULL;
         if (commentp != NULL)          if (commentp != NULL)
                 *commentp = NULL;                  *commentp = NULL;
   
Line 403 
Line 408 
         char *file = NULL;          char *file = NULL;
         int r = SSH_ERR_INTERNAL_ERROR;          int r = SSH_ERR_INTERNAL_ERROR;
   
         *keyp = NULL;          if (keyp != NULL)
                   *keyp = NULL;
   
         if (asprintf(&file, "%s-cert.pub", filename) == -1)          if (asprintf(&file, "%s-cert.pub", filename) == -1)
                 return SSH_ERR_ALLOC_FAIL;                  return SSH_ERR_ALLOC_FAIL;
Line 413 
Line 419 
         }          }
         if ((r = sshkey_try_load_public(pub, file, NULL)) != 0)          if ((r = sshkey_try_load_public(pub, file, NULL)) != 0)
                 goto out;                  goto out;
           /* success */
         *keyp = pub;          if (keyp != NULL) {
         pub = NULL;                  *keyp = pub;
                   pub = NULL;
           }
         r = 0;          r = 0;
   
  out:   out:
         free(file);          free(file);
         sshkey_free(pub);          sshkey_free(pub);
Line 432 
Line 439 
         struct sshkey *key = NULL, *cert = NULL;          struct sshkey *key = NULL, *cert = NULL;
         int r;          int r;
   
         *keyp = NULL;          if (keyp != NULL)
                   *keyp = NULL;
   
         switch (type) {          switch (type) {
 #ifdef WITH_OPENSSL  #ifdef WITH_OPENSSL
Line 462 
Line 470 
             (r = sshkey_cert_copy(cert, key)) != 0)              (r = sshkey_cert_copy(cert, key)) != 0)
                 goto out;                  goto out;
         r = 0;          r = 0;
         *keyp = key;          if (keyp != NULL) {
         key = NULL;                  *keyp = key;
                   key = NULL;
           }
  out:   out:
         sshkey_free(key);          sshkey_free(key);
         sshkey_free(cert);          sshkey_free(cert);

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.121