summaryrefslogtreecommitdiff
path: root/sshconnect1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect1.c')
-rw-r--r--sshconnect1.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/sshconnect1.c b/sshconnect1.c
index c82375a3d..c5ff7213a 100644
--- a/sshconnect1.c
+++ b/sshconnect1.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect1.c,v 1.26 2001/02/12 12:45:06 markus Exp $"); 16RCSID("$OpenBSD: sshconnect1.c,v 1.27 2001/02/15 23:19:59 markus Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19#include <openssl/evp.h> 19#include <openssl/evp.h>
@@ -51,20 +51,6 @@ u_int supported_authentications = 0;
51extern Options options; 51extern Options options;
52extern char *__progname; 52extern char *__progname;
53 53
54void
55ssh1_put_password(char *password)
56{
57 int size;
58 char *padded;
59
60 size = roundup(strlen(password) + 1, 32);
61 padded = xmalloc(size);
62 strlcpy(padded, password, size);
63 packet_put_string(padded, size);
64 memset(padded, 0, size);
65 xfree(padded);
66}
67
68/* 54/*
69 * Checks if the user has an authentication agent, and if so, tries to 55 * Checks if the user has an authentication agent, and if so, tries to
70 * authenticate using the agent. 56 * authenticate using the agent.
@@ -672,7 +658,7 @@ try_challenge_reponse_authentication(void)
672 break; 658 break;
673 } 659 }
674 packet_start(SSH_CMSG_AUTH_TIS_RESPONSE); 660 packet_start(SSH_CMSG_AUTH_TIS_RESPONSE);
675 ssh1_put_password(response); 661 ssh_put_password(response);
676 memset(response, 0, strlen(response)); 662 memset(response, 0, strlen(response));
677 xfree(response); 663 xfree(response);
678 packet_send(); 664 packet_send();
@@ -705,7 +691,7 @@ try_password_authentication(char *prompt)
705 error("Permission denied, please try again."); 691 error("Permission denied, please try again.");
706 password = read_passphrase(prompt, 0); 692 password = read_passphrase(prompt, 0);
707 packet_start(SSH_CMSG_AUTH_PASSWORD); 693 packet_start(SSH_CMSG_AUTH_PASSWORD);
708 ssh1_put_password(password); 694 ssh_put_password(password);
709 memset(password, 0, strlen(password)); 695 memset(password, 0, strlen(password));
710 xfree(password); 696 xfree(password);
711 packet_send(); 697 packet_send();