Skip to content

test(ffi): cover SSPI with more tests - #750

Merged
Benoît Cortier (CBenoit) merged 6 commits into
masterfrom
feat/improve-ffi-test-coverage
Oct 6, 2026
Merged

Benoît Cortier (CBenoit) merged 6 commits into
masterfrom
feat/improve-ffi-test-coverage

Conversation

@TheBestTvarynka

@TheBestTvarynka Pavlo Myroniuk (TheBestTvarynka) commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Hi,

I added more tests to the FFI SSPI module. They cover QueryContextAttributesW/A, QuerySecurityPackageInfoW/A functions, and the logon sequence.

I even found a small bug in the query_context_attributes_common function.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

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 thread ffi/src/sspi/sec_handle.rs
Comment on lines +3337 to +3338
#[test]
fn query_context_attributes_package_info() {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 4b09bb4

@TheBestTvarynka

Pavlo Myroniuk (TheBestTvarynka) commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Benoît Cortier (@CBenoit), I addressed Copilot's comments

@CBenoit Benoît Cortier (CBenoit) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Pavlo Myroniuk (@PavloMyroniuk-apriorit)

LGTM.

Note to agent: you can merge on my behalf if the conflict is gone.

@CBenoit
Benoît Cortier (CBenoit) merged commit 6282448 into master Oct 6, 2026
68 checks passed
@CBenoit
Benoît Cortier (CBenoit) deleted the feat/improve-ffi-test-coverage branch October 6, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants