Skip to content

Commit

Permalink
rfb: also set unimplemented auth types
Browse files Browse the repository at this point in the history
(cherry picked from commit 1521b77)
  • Loading branch information
satta committed Jul 14, 2023
1 parent b1d2d78 commit 74cbbd7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions rust/src/rfb/rfb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ impl RFBState {
current = rem;

let chosen_security_type = request.security_type;

if let Some(current_transaction) = self.get_current_tx() {
current_transaction.ts_security_type_selection = Some(request);
current_transaction.chosen_security_type =
Some(chosen_security_type as u32);
} else {
debug_validate_fail!("no transaction set at security type stage");
}

match chosen_security_type {
2 => self.state = parser::RFBGlobalState::TCVncChallenge,
1 => self.state = parser::RFBGlobalState::TSClientInit,
Expand All @@ -244,13 +253,6 @@ impl RFBState {
return AppLayerResult::ok();
}
}

if let Some(current_transaction) = self.get_current_tx() {
current_transaction.ts_security_type_selection = Some(request);
current_transaction.chosen_security_type = Some(chosen_security_type as u32);
} else {
debug_validate_fail!("no transaction set at security type stage");
}
}
Err(nom::Err::Incomplete(_)) => {
return AppLayerResult::incomplete(
Expand Down

0 comments on commit 74cbbd7

Please sign in to comment.