summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
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));