diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-02-15 23:20:00 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-02-15 23:20:00 +0000 |
commit | e2de8d6a1ba5bc1f948d3a373a7578caa7c4e6f6 (patch) | |
tree | 0cf2c63f80dd5b918fc5d82c61bcca1b948f782f /usr.bin/ssh/sshconnect.c | |
parent | 74cb2dda5f42cb174c986e42f0afbc743b18b75a (diff) |
genericize password padding function for SSH1 and SSH2.
add stylized echo to 2, too.
Diffstat (limited to 'usr.bin/ssh/sshconnect.c')
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index ff21ba3346c..b068d0bc6cb 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/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> @@ -762,3 +762,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); +} |