mirror of https://github.com/wolfSSL/wolfssh.git
cleanup accept state machine
parent
ccc1101612
commit
718a4f4b40
|
@ -251,8 +251,7 @@ int wolfSSH_accept(WOLFSSH* ssh)
|
|||
|
||||
case ACCEPT_BEGIN:
|
||||
if ( (ssh->error = SendServerVersion(ssh)) < WS_SUCCESS) {
|
||||
WLOG(WS_LOG_DEBUG, acceptError,
|
||||
"CLIENT_VERSION_DONE", ssh->error);
|
||||
WLOG(WS_LOG_DEBUG, acceptError, "BEGIN", ssh->error);
|
||||
return WS_FATAL_ERROR;
|
||||
}
|
||||
ssh->acceptState = ACCEPT_SERVER_VERSION_SENT;
|
||||
|
@ -261,7 +260,8 @@ int wolfSSH_accept(WOLFSSH* ssh)
|
|||
case ACCEPT_SERVER_VERSION_SENT:
|
||||
while (ssh->clientState < CLIENT_VERSION_DONE) {
|
||||
if ( (ssh->error = ProcessClientVersion(ssh)) < WS_SUCCESS) {
|
||||
WLOG(WS_LOG_DEBUG, acceptError, "BEGIN", ssh->error);
|
||||
WLOG(WS_LOG_DEBUG, acceptError,
|
||||
"SERVER_VERSION_SENT", ssh->error);
|
||||
return WS_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ int wolfSSH_accept(WOLFSSH* ssh)
|
|||
while (ssh->keyingState < KEYING_KEYED) {
|
||||
if ( (ssh->error = DoReceive(ssh)) < WS_SUCCESS) {
|
||||
WLOG(WS_LOG_DEBUG, acceptError,
|
||||
"SERVER_VERSION_SENT", ssh->error);
|
||||
"CLIENT_VERSION_DONE", ssh->error);
|
||||
return WS_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -342,8 +342,8 @@ enum KeyingStates {
|
|||
|
||||
enum AcceptStates {
|
||||
ACCEPT_BEGIN = 0,
|
||||
ACCEPT_CLIENT_VERSION_DONE,
|
||||
ACCEPT_SERVER_VERSION_SENT,
|
||||
ACCEPT_CLIENT_VERSION_DONE,
|
||||
ACCEPT_KEYED,
|
||||
ACCEPT_CLIENT_USERAUTH_REQUEST_DONE,
|
||||
ACCEPT_SERVER_USERAUTH_ACCEPT_SENT,
|
||||
|
|
Loading…
Reference in New Issue