mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
wolfssh: set the password correctly for PASSWORD auth
This commit is contained in:
parent
820775a29a
commit
68403cdbc6
@ -337,12 +337,13 @@ static int userauth(byte authtype,
|
|||||||
void *ctx)
|
void *ctx)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = ctx;
|
struct connectdata *conn = ctx;
|
||||||
word32 plen = (word32) strlen(conn->passwd);
|
|
||||||
DEBUGF(infof(conn->data, "wolfssh callback: type %s\n",
|
DEBUGF(infof(conn->data, "wolfssh callback: type %s\n",
|
||||||
authtype == WOLFSSH_USERAUTH_PASSWORD ? "PASSWORD" :
|
authtype == WOLFSSH_USERAUTH_PASSWORD ? "PASSWORD" :
|
||||||
"PUBLICCKEY"));
|
"PUBLICCKEY"));
|
||||||
authdata->sf.password.password = (byte *)conn->user;
|
if(authtype == WOLFSSH_USERAUTH_PASSWORD) {
|
||||||
authdata->sf.password.passwordSz = plen;
|
authdata->sf.password.password = (byte *)conn->passwd;
|
||||||
|
authdata->sf.password.passwordSz = (word32) strlen(conn->passwd);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user