Skip to content

Move manual_auth out of the handshake loop.#89

Merged
laudrup merged 1 commit into
laudrup:masterfrom
jens-diewald:move-manual-auth-out-of-handshake
Aug 1, 2024
Merged

Move manual_auth out of the handshake loop.#89
laudrup merged 1 commit into
laudrup:masterfrom
jens-diewald:move-manual-auth-out-of-handshake

Conversation

@jens-diewald
Copy link
Copy Markdown
Contributor

Cherry picked from #77.
This was the first proper change from that PR.
I will wait for this to be reviewed and hopefully merged before getting the other changes from that PR up to date.

Short explanation: There was some redundancy in the handling of sspi_handshake::state::done and sspi_handshake::state::done_with_data and the corresponding error values.
This changes the code such that the manual auth is only called after sspi_handshake::state::done was produced, removing the need for the two *_with_data values.

Or rather move it to the end where it is called at most once.
This resolves the TODO on sspi_handshake::state
and is intended to simplify the code to allow for further refactoring.

There is a small change in behavior:
As a server, all communication with the client is now done before manual_auth.
Before, manual_auth was called as early as possible and
possibly more data was sent through the stream after that.
@laudrup
Copy link
Copy Markdown
Owner

laudrup commented Aug 1, 2024

Removing code and simplifying things is always great 👍

Thanks a lot for this.

@laudrup laudrup merged commit aef53ba into laudrup:master Aug 1, 2024
@jens-diewald jens-diewald deleted the move-manual-auth-out-of-handshake branch October 24, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants