mirror of https://github.com/wolfSSL/wolfssh.git
WS_USER_AUTH_E for wolfSSH_get_error
parent
58a768df29
commit
3e58768b7e
|
@ -391,6 +391,11 @@ static THREAD_RETURN WOLFSSH_THREAD server_worker(void* vArgs)
|
|||
ret = 0; /* don't break out of loop with version miss match */
|
||||
printf("Unsupported version error\n");
|
||||
}
|
||||
else if (ret == WS_FATAL_ERROR && wolfSSH_get_error(threadCtx->ssh) ==
|
||||
WS_USER_AUTH_E) {
|
||||
ret = 0; /* don't break out of loop with user auth error */
|
||||
printf("User Authentication error\n");
|
||||
}
|
||||
|
||||
if (wolfSSH_shutdown(threadCtx->ssh) != WS_SUCCESS) {
|
||||
fprintf(stderr, "Error with SSH shutdown.\n");
|
||||
|
|
|
@ -3225,7 +3225,7 @@ static int DoUserAuthRequestPassword(WOLFSSH* ssh, WS_UserAuthData* authData,
|
|||
WLOG(WS_LOG_DEBUG, "DUARPW: password rejected");
|
||||
ret = SendUserAuthFailure(ssh, 0);
|
||||
if (ret == WS_SUCCESS)
|
||||
ret = WS_FATAL_ERROR;
|
||||
ret = WS_USER_AUTH_E;
|
||||
}
|
||||
else {
|
||||
WLOG(WS_LOG_DEBUG, "DUARPW: password check failed, retry");
|
||||
|
|
|
@ -105,7 +105,8 @@ enum WS_ErrorCodes {
|
|||
WS_CLOSE_FILE_E = -1065, /* Unable to close local file */
|
||||
WS_PUBKEY_REJECTED_E = -1066, /* Server public key rejected */
|
||||
WS_EXTDATA = -1067, /* Extended Data available to be read */
|
||||
|
||||
WS_USER_AUTH_E = -1068, /* User authentication error */
|
||||
|
||||
WS_LAST_E = -1067 /* Update this to indicate last error */
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue