diff options
author | Damien Miller <djm@mindrot.org> | 2002-01-22 23:18:15 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-01-22 23:18:15 +1100 |
commit | 708d21c8028ed2bf137a0c4ff75bf7c6bfeff6e9 (patch) | |
tree | e878520026f2a9e970f4152da6ffb3b864a2a195 /authfile.c | |
parent | dc9e067614947f2f2b0866cb1bc75e6ac620fb7f (diff) |
- stevesk@cvs.openbsd.org 2001/12/29 21:56:01
[authfile.c channels.c compress.c packet.c sftp-server.c ssh-agent.c ssh-keygen.c]
remove unneeded casts and some char->u_char cleanup; ok markus@
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/authfile.c b/authfile.c index 7026e24c4..69e0da03b 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include "includes.h" | 38 | #include "includes.h" |
39 | RCSID("$OpenBSD: authfile.c,v 1.44 2001/12/27 18:26:13 markus Exp $"); | 39 | RCSID("$OpenBSD: authfile.c,v 1.45 2001/12/29 21:56:01 stevesk Exp $"); |
40 | 40 | ||
41 | #include <openssl/err.h> | 41 | #include <openssl/err.h> |
42 | #include <openssl/evp.h> | 42 | #include <openssl/evp.h> |
@@ -68,7 +68,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase, | |||
68 | const char *comment) | 68 | const char *comment) |
69 | { | 69 | { |
70 | Buffer buffer, encrypted; | 70 | Buffer buffer, encrypted; |
71 | char buf[100], *cp; | 71 | u_char buf[100], *cp; |
72 | int fd, i; | 72 | int fd, i; |
73 | CipherContext ciphercontext; | 73 | CipherContext ciphercontext; |
74 | Cipher *cipher; | 74 | Cipher *cipher; |
@@ -132,8 +132,8 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase, | |||
132 | cp = buffer_append_space(&encrypted, buffer_len(&buffer)); | 132 | cp = buffer_append_space(&encrypted, buffer_len(&buffer)); |
133 | 133 | ||
134 | cipher_set_key_string(&ciphercontext, cipher, passphrase); | 134 | cipher_set_key_string(&ciphercontext, cipher, passphrase); |
135 | cipher_encrypt(&ciphercontext, (u_char *) cp, | 135 | cipher_encrypt(&ciphercontext, cp, |
136 | (u_char *) buffer_ptr(&buffer), buffer_len(&buffer)); | 136 | buffer_ptr(&buffer), buffer_len(&buffer)); |
137 | memset(&ciphercontext, 0, sizeof(ciphercontext)); | 137 | memset(&ciphercontext, 0, sizeof(ciphercontext)); |
138 | 138 | ||
139 | /* Destroy temporary data. */ | 139 | /* Destroy temporary data. */ |
@@ -314,7 +314,7 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase, | |||
314 | int i, check1, check2, cipher_type; | 314 | int i, check1, check2, cipher_type; |
315 | off_t len; | 315 | off_t len; |
316 | Buffer buffer, decrypted; | 316 | Buffer buffer, decrypted; |
317 | char *cp; | 317 | u_char *cp; |
318 | CipherContext ciphercontext; | 318 | CipherContext ciphercontext; |
319 | Cipher *cipher; | 319 | Cipher *cipher; |
320 | Key *prv = NULL; | 320 | Key *prv = NULL; |
@@ -381,8 +381,8 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase, | |||
381 | 381 | ||
382 | /* Rest of the buffer is encrypted. Decrypt it using the passphrase. */ | 382 | /* Rest of the buffer is encrypted. Decrypt it using the passphrase. */ |
383 | cipher_set_key_string(&ciphercontext, cipher, passphrase); | 383 | cipher_set_key_string(&ciphercontext, cipher, passphrase); |
384 | cipher_decrypt(&ciphercontext, (u_char *) cp, | 384 | cipher_decrypt(&ciphercontext, cp, |
385 | (u_char *) buffer_ptr(&buffer), buffer_len(&buffer)); | 385 | buffer_ptr(&buffer), buffer_len(&buffer)); |
386 | memset(&ciphercontext, 0, sizeof(ciphercontext)); | 386 | memset(&ciphercontext, 0, sizeof(ciphercontext)); |
387 | buffer_free(&buffer); | 387 | buffer_free(&buffer); |
388 | 388 | ||