summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-16 12:34:57 +1100
committerDamien Miller <djm@mindrot.org>2001-02-16 12:34:57 +1100
commit79438cc03040e22a053f2cb02e42483272b458df (patch)
treecbc85e2742e20db8ed40835b087523f78eb4e9a8 /sshconnect.c
parent217f567187a9b1d32019666151d702c87332c72b (diff)
- (djm) OpenBSD CVS:
- markus@cvs.openbsd.org 2001/02/15 16:19:59 [channels.c channels.h serverloop.c sshconnect.c sshconnect.h] [sshconnect1.c sshconnect2.c] genericize password padding function for SSH1 and SSH2. add stylized echo to 2, too. - (djm) Add roundup() macro to defines.h
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 389d6598..623caed7 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.96 2001/02/08 22:35:30 markus Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.97 2001/02/15 23:19:59 markus Exp $");
#include <openssl/bn.h>
@@ -770,3 +770,18 @@ ssh_login(int host_key_valid, RSA *own_host_key, const char *orighost,
ssh_userauth(local_user, server_user, host, host_key_valid, own_host_key);
}
}
+
+void
+ssh_put_password(char *password)
+{
+ int size;
+ char *padded;
+
+ size = roundup(strlen(password) + 1, 32);
+ padded = xmalloc(size);
+ memset(padded, 0, size);
+ strlcpy(padded, password, size);
+ packet_put_string(padded, size);
+ memset(padded, 0, size);
+ xfree(padded);
+}