summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-04-06 12:32:37 +1000
committerDamien Miller <djm@mindrot.org>2000-04-06 12:32:37 +1000
commit1383bd8eb91a8ec9c8d283679faec5925b0ccc42 (patch)
treef71278df6c50983ea3dad850ae79c45c340d9362 /authfile.c
parent74a333bbe11f67c59c559e0f424d5945eb438577 (diff)
- OpenBSD CVS update:
- [channels.c] close efd on eof - [clientloop.c compat.c ssh.c sshconnect.c myproposal.h] ssh2 client implementation, interops w/ ssh.com and lsh servers. - [sshconnect.c] missing free. - [authfile.c cipher.c cipher.h packet.c sshconnect.c sshd.c] remove unused argument, split cipher_mask() - [clientloop.c] re-order: group ssh1 vs. ssh2 - Make Redhat spec require openssl >= 0.9.5a
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/authfile.c b/authfile.c
index a6dab7575..6ce0ac61f 100644
--- a/authfile.c
+++ b/authfile.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: authfile.c,v 1.7 2000/03/02 12:57:18 damien Exp $"); 18RCSID("$Id: authfile.c,v 1.8 2000/04/06 02:32:38 damien Exp $");
19 19
20#ifdef HAVE_OPENSSL 20#ifdef HAVE_OPENSSL
21#include <openssl/bn.h> 21#include <openssl/bn.h>
@@ -107,7 +107,7 @@ save_private_key(const char *filename, const char *passphrase,
107 /* Allocate space for the private part of the key in the buffer. */ 107 /* Allocate space for the private part of the key in the buffer. */
108 buffer_append_space(&encrypted, &cp, buffer_len(&buffer)); 108 buffer_append_space(&encrypted, &cp, buffer_len(&buffer));
109 109
110 cipher_set_key_string(&cipher, cipher_type, passphrase, 1); 110 cipher_set_key_string(&cipher, cipher_type, passphrase);
111 cipher_encrypt(&cipher, (unsigned char *) cp, 111 cipher_encrypt(&cipher, (unsigned char *) cp,
112 (unsigned char *) buffer_ptr(&buffer), 112 (unsigned char *) buffer_ptr(&buffer),
113 buffer_len(&buffer)); 113 buffer_len(&buffer));
@@ -286,7 +286,7 @@ load_private_key(const char *filename, const char *passphrase,
286 xfree(buffer_get_string(&buffer, NULL)); 286 xfree(buffer_get_string(&buffer, NULL));
287 287
288 /* Check that it is a supported cipher. */ 288 /* Check that it is a supported cipher. */
289 if (((cipher_mask() | SSH_CIPHER_NONE | SSH_AUTHFILE_CIPHER) & 289 if (((cipher_mask1() | SSH_CIPHER_NONE | SSH_AUTHFILE_CIPHER) &
290 (1 << cipher_type)) == 0) { 290 (1 << cipher_type)) == 0) {
291 debug("Unsupported cipher %.100s used in key file %.200s.", 291 debug("Unsupported cipher %.100s used in key file %.200s.",
292 cipher_name(cipher_type), filename); 292 cipher_name(cipher_type), filename);
@@ -298,7 +298,7 @@ load_private_key(const char *filename, const char *passphrase,
298 buffer_append_space(&decrypted, &cp, buffer_len(&buffer)); 298 buffer_append_space(&decrypted, &cp, buffer_len(&buffer));
299 299
300 /* Rest of the buffer is encrypted. Decrypt it using the passphrase. */ 300 /* Rest of the buffer is encrypted. Decrypt it using the passphrase. */
301 cipher_set_key_string(&cipher, cipher_type, passphrase, 0); 301 cipher_set_key_string(&cipher, cipher_type, passphrase);
302 cipher_decrypt(&cipher, (unsigned char *) cp, 302 cipher_decrypt(&cipher, (unsigned char *) cp,
303 (unsigned char *) buffer_ptr(&buffer), 303 (unsigned char *) buffer_ptr(&buffer),
304 buffer_len(&buffer)); 304 buffer_len(&buffer));