test(ffi): cover SSPI with more tests - #750
Open
Pavlo Myroniuk (TheBestTvarynka) wants to merge 4 commits into
Open
Pavlo Myroniuk (TheBestTvarynka) wants to merge 4 commits into
Pavlo Myroniuk (TheBestTvarynka) wants to merge 4 commits into
Conversation
ffi tests
Pavlo Myroniuk (TheBestTvarynka)
force-pushed
the
feat/improve-ffi-test-coverage
branch
from
September 25, 2026 15:17
f9480ca to
d5de058
Compare
Pavlo Myroniuk (TheBestTvarynka)
marked this pull request as ready for review
September 25, 2026 15:17
Pavlo Myroniuk (TheBestTvarynka)
requested a review
from Benoît Cortier (CBenoit)
September 25, 2026 18:18
Copilot started reviewing on behalf of
Benoît Cortier (CBenoit)
September 29, 2026 03:55
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The handshake tests omit required CompleteAuthToken calls, and ANSI package-info attribute coverage is missing.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds broader FFI SSPI test coverage and fixes in-place server-auth flag output handling.
Changes:
- Handles unknown security packages without panicking.
- Adds package-info, context-attribute, and NTLM handshake tests.
- Refreshes generated .NET handle documentation.
| File | Description |
|---|---|
ffi/src/sspi/sec_pkg_info.rs |
Adds safe package lookup and tests. |
ffi/src/sspi/sec_handle.rs |
Fixes attribute output and expands FFI tests. |
ffi/dotnet/Devolutions.Sspi/Sspi.g.cs |
Updates generated handle documentation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+2392
to
+2397
| if client_status == SecurityStatus::Ok.to_u32().unwrap() | ||
| && server_status == SecurityStatus::CompleteNeeded.to_u32().unwrap() | ||
| { | ||
| // Both security contexts are established: they must be usable. | ||
| assert_ntlm_context_sizes(&mut client_sec_context); | ||
| assert_ntlm_context_sizes(&mut server_sec_context); |
Comment on lines
+3337
to
+3338
| #[test] | ||
| fn query_context_attributes_package_info() { |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Hi,
I added more tests to the FFI SSPI module. They cover
QueryContextAttributesW/A,QuerySecurityPackageInfoW/Afunctions, and the logon sequence.I even found a small bug in the
query_context_attributes_commonfunction.