Skip to content

fix(#433): require EAP-TLS key and cert in builder#436

Merged
cachebag merged 1 commit into
masterfrom
fix/eap-tls-builder-validation
May 31, 2026
Merged

fix(#433): require EAP-TLS key and cert in builder#436
cachebag merged 1 commit into
masterfrom
fix/eap-tls-builder-validation

Conversation

@cachebag
Copy link
Copy Markdown
Collaborator

  • make EapOptionsBuilder::build() reject incomplete EAP-TLS configs
  • require either private_key_path or private_key_blob
  • require either client_cert_path or client_cert_blob
  • add unit coverage for missing TLS private key and client certificate

This keeps the existing builder API unchanged and moves TLS required-field checks earlier, matching the builder docs.

@cachebag cachebag requested a review from Copilot May 31, 2026 18:52
@cachebag cachebag self-assigned this May 31, 2026
@cachebag cachebag added nmrs Changes to nmrs api-surface Public API design, re-exports, and semver-relevant changes wifi WiFi connection management labels May 31, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens validation in EapOptionsBuilder::build() so EAP-TLS configurations fail early when required TLS inputs are missing, aligning runtime behavior with the builder’s documented TLS example.

Changes:

  • Reject EAP-TLS builds that omit both private_key_path and private_key_blob.
  • Reject EAP-TLS builds that omit both client_cert_path and client_cert_blob.
  • Add unit tests covering missing TLS private key and missing client certificate.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
nmrs/src/api/models/wifi.rs Adds EAP-TLS-specific required-field validation during EapOptionsBuilder::build().
nmrs/src/api/models/tests.rs Adds unit tests to ensure missing TLS key/cert are rejected with IncompleteBuilder.

@cachebag cachebag merged commit 3b4d883 into master May 31, 2026
7 checks passed
@cachebag cachebag deleted the fix/eap-tls-builder-validation branch May 31, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-surface Public API design, re-exports, and semver-relevant changes nmrs Changes to nmrs wifi WiFi connection management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants