summaryrefslogtreecommitdiffstats
path: root/authfile.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:18:15 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:18:15 +1100
commit708d21c8028ed2bf137a0c4ff75bf7c6bfeff6e9 (patch)
treee878520026f2a9e970f4152da6ffb3b864a2a195 /authfile.c
parentdc9e067614947f2f2b0866cb1bc75e6ac620fb7f (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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/authfile.c b/authfile.c
index 7026e24c..69e0da03 100644
--- a/authfile.c
+++ b/authfile.c
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.44 2001/12/27 18:26:13 markus Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.45 2001/12/29 21:56:01 stevesk Exp $");
#include <openssl/err.h>
#include <openssl/evp.h>
@@ -68,7 +68,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase,
const char *comment)
{
Buffer buffer, encrypted;
- char buf[100], *cp;
+ u_char buf[100], *cp;
int fd, i;
CipherContext ciphercontext;
Cipher *cipher;
@@ -132,8 +132,8 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase,
cp = buffer_append_space(&encrypted, buffer_len(&buffer));
cipher_set_key_string(&ciphercontext, cipher, passphrase);
- cipher_encrypt(&ciphercontext, (u_char *) cp,
- (u_char *) buffer_ptr(&buffer), buffer_len(&buffer));
+ cipher_encrypt(&ciphercontext, cp,
+ buffer_ptr(&buffer), buffer_len(&buffer));
memset(&ciphercontext, 0, sizeof(ciphercontext));
/* Destroy temporary data. */
@@ -314,7 +314,7 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase,
int i, check1, check2, cipher_type;
off_t len;
Buffer buffer, decrypted;
- char *cp;
+ u_char *cp;
CipherContext ciphercontext;
Cipher *cipher;
Key *prv = NULL;
@@ -381,8 +381,8 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase,
/* Rest of the buffer is encrypted. Decrypt it using the passphrase. */
cipher_set_key_string(&ciphercontext, cipher, passphrase);
- cipher_decrypt(&ciphercontext, (u_char *) cp,
- (u_char *) buffer_ptr(&buffer), buffer_len(&buffer));
+ cipher_decrypt(&ciphercontext, cp,
+ buffer_ptr(&buffer), buffer_len(&buffer));
memset(&ciphercontext, 0, sizeof(ciphercontext));
buffer_free(&buffer);