summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
authordjm <djm>2001-12-21 03:56:54 +0000
committerdjm <djm>2001-12-21 03:56:54 +0000
commit0d21009d45b1594a113d283b5004c851db09c7a1 (patch)
treee4a60c08ef0c6abd40404519e91d2357da46588b /authfile.c
parentec400f57c4d35357801c382e4181ed34e45ab447 (diff)
downloadopenssh-0d21009d45b1594a113d283b5004c851db09c7a1.tar.gz
- stevesk@cvs.openbsd.org 2001/12/19 17:16:13
[authfile.c bufaux.c bufaux.h buffer.c buffer.h packet.c packet.h ssh.c] change the buffer/packet interface to use void* vs. char*; ok markus@
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/authfile.c b/authfile.c
index abf2877f..3bfca4ac 100644
--- a/authfile.c
+++ b/authfile.c
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.41 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.42 2001/12/19 17:16:13 stevesk Exp $");
#include <openssl/err.h>
#include <openssl/evp.h>
@@ -128,7 +128,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase,
buffer_put_cstring(&encrypted, comment);
/* 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_encrypt(&ciphercontext, (u_char *) cp,
@@ -239,7 +239,7 @@ key_load_public_rsa1(int fd, const char *filename, char **commentp)
lseek(fd, (off_t) 0, SEEK_SET);
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) {
debug("Read from key file %.200s failed: %.100s", filename,
@@ -324,7 +324,7 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase,
lseek(fd, (off_t) 0, SEEK_SET);
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) {
debug("Read from key file %.200s failed: %.100s", filename,
@@ -378,7 +378,7 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase,
}
/* Initialize space for decrypted data. */
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. */
cipher_set_key_string(&ciphercontext, cipher, passphrase);