[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.33 and 1.34

version 1.33, 2001/05/16 20:51:57 version 1.34, 2001/05/28 10:08:55
Line 540 
Line 540 
 key_load_private(const char *filename, const char *passphrase,  key_load_private(const char *filename, const char *passphrase,
     char **commentp)      char **commentp)
 {  {
         Key *pub;          Key *pub, *prv;
         int fd;          int fd;
   
         fd = open(filename, O_RDONLY);          fd = open(filename, O_RDONLY);
Line 555 
Line 555 
         lseek(fd, (off_t) 0, SEEK_SET);         /* rewind */          lseek(fd, (off_t) 0, SEEK_SET);         /* rewind */
         if (pub == NULL) {          if (pub == NULL) {
                 /* closes fd */                  /* closes fd */
                 return key_load_private_pem(fd, KEY_UNSPEC, passphrase,                  prv = key_load_private_pem(fd, KEY_UNSPEC, passphrase, NULL);
                     commentp);                  /* use the filename as a comment for PEM */
                   if (commentp && prv)
                           commentp = xstrdup(filename);
         } else {          } else {
                 /* it's a SSH v1 key if the public key part is readable */                  /* it's a SSH v1 key if the public key part is readable */
                 key_free(pub);                  key_free(pub);
                 /* closes fd */                  /* closes fd */
                 return key_load_private_rsa1(fd, filename, passphrase, NULL);                  prv = key_load_private_rsa1(fd, filename, passphrase, NULL);
         }          }
           return prv;
 }  }
   
 int  int

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34