diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-01-15 14:23:03 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-01-15 22:10:39 +0100 |
commit | 68403cdbc6325bcbe4e4128c263db5d04a3c77c6 (patch) | |
tree | 03dddeba29dc262b22bba7513665d86840394f90 /lib/vssh | |
parent | 820775a29a21cd9198d4381c79fe2febba804f6d (diff) |
wolfssh: set the password correctly for PASSWORD auth
Diffstat (limited to 'lib/vssh')
-rw-r--r-- | lib/vssh/wolfssh.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/vssh/wolfssh.c b/lib/vssh/wolfssh.c index 9e14df3a3..f9c43de70 100644 --- a/lib/vssh/wolfssh.c +++ b/lib/vssh/wolfssh.c @@ -337,12 +337,13 @@ static int userauth(byte authtype, void *ctx) { struct connectdata *conn = ctx; - word32 plen = (word32) strlen(conn->passwd); DEBUGF(infof(conn->data, "wolfssh callback: type %s\n", authtype == WOLFSSH_USERAUTH_PASSWORD ? "PASSWORD" : "PUBLICCKEY")); - authdata->sf.password.password = (byte *)conn->user; - authdata->sf.password.passwordSz = plen; + if(authtype == WOLFSSH_USERAUTH_PASSWORD) { + authdata->sf.password.password = (byte *)conn->passwd; + authdata->sf.password.passwordSz = (word32) strlen(conn->passwd); + } return 0; } |