Skip to content

Commit

Permalink
fix typo in state machine type
Browse files Browse the repository at this point in the history
  • Loading branch information
JaapWijnen committed Aug 11, 2022
1 parent 73f0b5c commit 64deede
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct SSHConnectionStateMachine {
case active(ActiveState)

/// We have received a KeyExchangeInit message from the active state, and so will be rekeying shortly.
case receivedKexInitWhenActive(ReceivedKexInitWhenActiveState)
case receivedKexInitWhenActive(ReceivedKeyInitWhenActiveState)

/// We have sent a KeyExchangeInit message from the active state, and so will be rekeying shortly.
case sentKexInitWhenActive(SentKexInitWhenActiveState)
Expand Down Expand Up @@ -386,7 +386,7 @@ struct SSHConnectionStateMachine {
return .globalRequestResponse(.failure)
case .keyExchange(let message):
// Attempting to rekey.
var newState = ReceivedKexInitWhenActiveState(state, allocator: allocator, loop: loop)
var newState = ReceivedKeyInitWhenActiveState(state, allocator: allocator, loop: loop)
let result = try newState.receiveKeyExchangeMessage(message)
self.state = .receivedKexInitWhenActive(newState)
return result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension SSHConnectionStateMachine {
/// The state of a state machine that has received a KeyExchangeInit message after
/// having been active. In this state, no further channel messages may be sent by the
/// remote peer until key exchange is done. We can send channel messages _and_ key exchange init.
struct ReceivedKexInitWhenActiveState {
struct ReceivedKeyInitWhenActiveState {
/// The role of the connection
let role: SSHConnectionRole

Expand All @@ -43,8 +43,8 @@ extension SSHConnectionStateMachine {
}
}

extension SSHConnectionStateMachine.ReceivedKexInitWhenActiveState: AcceptsKeyExchangeMessages {}
extension SSHConnectionStateMachine.ReceivedKeyInitWhenActiveState: AcceptsKeyExchangeMessages {}

extension SSHConnectionStateMachine.ReceivedKexInitWhenActiveState: SendsChannelMessages {}
extension SSHConnectionStateMachine.ReceivedKeyInitWhenActiveState: SendsChannelMessages {}

extension SSHConnectionStateMachine.ReceivedKexInitWhenActiveState: SendsKeyExchangeMessages {}
extension SSHConnectionStateMachine.ReceivedKeyInitWhenActiveState: SendsKeyExchangeMessages {}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension SSHConnectionStateMachine {
/// The backing state machine.
var keyExchangeStateMachine: SSHKeyExchangeStateMachine

init(_ previousState: ReceivedKexInitWhenActiveState) {
init(_ previousState: ReceivedKeyInitWhenActiveState) {
self.role = previousState.role
self.parser = previousState.parser
self.serializer = previousState.serializer
Expand Down

0 comments on commit 64deede

Please sign in to comment.