option for no SendUserAuthFailure on USERAUTH_REGENCTED

pull/208/head
Takashi Kojo 2019-09-17 15:40:33 +09:00 committed by John Safranek
parent 55c0352a76
commit 6c979231c7
1 changed files with 4 additions and 0 deletions

View File

@ -3266,9 +3266,13 @@ static int DoUserAuthRequestPassword(WOLFSSH* ssh, WS_UserAuthData* authData,
}
else if (ret == WOLFSSH_USERAUTH_REJECTED) {
WLOG(WS_LOG_DEBUG, "DUARPW: password rejected");
#ifndef NO_FAILUER_ON_REHECED
ret = SendUserAuthFailure(ssh, 0);
if (ret == WS_SUCCESS)
ret = WS_USER_AUTH_E;
#else
ret = WS_USER_AUTH_E;
#endif
}
else {
WLOG(WS_LOG_DEBUG, "DUARPW: password check failed, retry");