Skip to content

fix(#478): make EAP cert sources mutually exclusive - #521

Open
VrtxOmega wants to merge 2 commits into
freedesktop-rs:masterfrom
VrtxOmega:fix/478-wifi-cert-conflict
Open

fix(#478): make EAP cert sources mutually exclusive#521
VrtxOmega wants to merge 2 commits into
freedesktop-rs:masterfrom
VrtxOmega:fix/478-wifi-cert-conflict

Conversation

@VrtxOmega

@VrtxOmega VrtxOmega commented Jul 30, 2026

Copy link
Copy Markdown

Fixes #478.

Summary

  • represent each EAP certificate or private key with one typed EapCertSource::Path or EapCertSource::Blob value, making conflicting sources unrepresentable
  • keep build_wifi_connection, wpa_eap, and wpa3_eap_192_bit infallible and preserve fluent builder chaining
  • retain the existing path/blob constructors and setters; a later setter replaces the earlier source for that certificate or key
  • update validation, NetworkManager serialization, docs, changelog, and regressions for both source variants

Open and WPA-PSK builder behavior is unchanged. The requested EapOptions field redesign is a breaking public-API change and is recorded in the changelog.

Validation

  • cargo fmt --all -- --check
  • cargo check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test -p nmrs --lib --all-features — 627 passed
  • cargo test --doc --all-features --workspace — 129 passed, 16 ignored
  • cargo test --all-features --workspace — 627 unit tests passed; 4 isolated-environment integration tests ignored as designed
  • git diff --check origin/master...HEAD
  • cargo semver-checks check-release -p nmrs — expected failure at the current 3.4.2 version because the enum redesign removes six public fields; the repository release policy classifies this as a major-version change

The source and behavior gates pass. The remaining release-policy choice is whether this redesign should target the next major release or use a compatibility migration; I have not added an unrequested version bump.

AI assistance

I used Codex to inspect the issue and maintainer review, implement the focused typed-source redesign and regression tests, and run the verification commands above. I reviewed the exact diff and verification output before updating this pull request.

@VrtxOmega
VrtxOmega temporarily deployed to self-hosted-pr-integration July 30, 2026 01:19 — with GitHub Actions Inactive
@cachebag cachebag added bug Something isn't working builders Connection builder API and validation labels Jul 30, 2026

@cachebag cachebag 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.

LGTM. Going to wait to merge. Want to think about the source break for a little ..

@cachebag cachebag 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.

@VrtxOmega wdyt?

Comment thread nmrs/src/api/builders/wifi.rs Outdated
@VrtxOmega VrtxOmega changed the title fix(#478): return errors for conflicting EAP cert inputs fix(#478): make EAP cert sources mutually exclusive Aug 1, 2026
@VrtxOmega
VrtxOmega deployed to self-hosted-pr-integration August 1, 2026 05:22 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working builders Connection builder API and validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] WifiConnectionBuilder panics on conflicting eap cert path and blob

2 participants