[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.41 and 1.42

version 1.41, 2001/12/19 07:18:56 version 1.42, 2001/12/19 17:16:13
Line 128 
Line 128 
         buffer_put_cstring(&encrypted, comment);          buffer_put_cstring(&encrypted, comment);
   
         /* Allocate space for the private part of the key in the buffer. */          /* Allocate space for the private part of the key in the buffer. */
         buffer_append_space(&encrypted, &cp, buffer_len(&buffer));          cp = buffer_append_space(&encrypted, buffer_len(&buffer));
   
         cipher_set_key_string(&ciphercontext, cipher, passphrase);          cipher_set_key_string(&ciphercontext, cipher, passphrase);
         cipher_encrypt(&ciphercontext, (u_char *) cp,          cipher_encrypt(&ciphercontext, (u_char *) cp,
Line 239 
Line 239 
         lseek(fd, (off_t) 0, SEEK_SET);          lseek(fd, (off_t) 0, SEEK_SET);
   
         buffer_init(&buffer);          buffer_init(&buffer);
         buffer_append_space(&buffer, &cp, len);          cp = buffer_append_space(&buffer, len);
   
         if (read(fd, cp, (size_t) len) != (size_t) len) {          if (read(fd, cp, (size_t) len) != (size_t) len) {
                 debug("Read from key file %.200s failed: %.100s", filename,                  debug("Read from key file %.200s failed: %.100s", filename,
Line 324 
Line 324 
         lseek(fd, (off_t) 0, SEEK_SET);          lseek(fd, (off_t) 0, SEEK_SET);
   
         buffer_init(&buffer);          buffer_init(&buffer);
         buffer_append_space(&buffer, &cp, len);          cp = buffer_append_space(&buffer, len);
   
         if (read(fd, cp, (size_t) len) != (size_t) len) {          if (read(fd, cp, (size_t) len) != (size_t) len) {
                 debug("Read from key file %.200s failed: %.100s", filename,                  debug("Read from key file %.200s failed: %.100s", filename,
Line 378 
Line 378 
         }          }
         /* Initialize space for decrypted data. */          /* Initialize space for decrypted data. */
         buffer_init(&decrypted);          buffer_init(&decrypted);
         buffer_append_space(&decrypted, &cp, buffer_len(&buffer));          cp = buffer_append_space(&decrypted, buffer_len(&buffer));
   
         /* Rest of the buffer is encrypted.  Decrypt it using the passphrase. */          /* Rest of the buffer is encrypted.  Decrypt it using the passphrase. */
         cipher_set_key_string(&ciphercontext, cipher, passphrase);          cipher_set_key_string(&ciphercontext, cipher, passphrase);

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42