Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move manual_auth out of the handshake loop. #89

Merged

Conversation

jens-diewald
Copy link
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
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
114 checks passed
@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