fix(#478): make EAP cert validation additive instead of breaking - #529
Merged
Merged
Conversation
The previous fix changed build_wifi_connection(), wpa_eap(), and wpa3_eap_192_bit() to return Result, which is a compile break for every caller on 3.x.
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.
Reworks #478 so it ships in a minor instead of forcing 4.0.0.
The original fix was correct about the bug — supplying an EAP certificate as both a path and a blob used to
panic!but fixed it by changing three public signatures to returnResult.Validation was happening inside construction, which is why making it strict forced the return type to change. Splitting them apart lets both behaviours share the construction code:
build_wifi_connection() -> HashMaptry_build_wifi_connection() -> Result<HashMap>WifiConnectionBuilder::wpa_eap() -> Selftry_wpa_eap() -> Result<Self>WifiConnectionBuilder::wpa3_eap_192_bit() -> Selftry_wpa3_eap_192_bit() -> Result<Self>The panic stays fixed on both paths. The deprecated functions log a warning naming the conflicting field and use the path; the
try_*functions returnConnectionError::InvalidInput. Nounwrap, nounreachable!.Closes #478