Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unicode in SSIDs and PSKs #15

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

aj-bagwell
Copy link
Contributor

The corresponding c code for encoding and decoding them can be found in wpa_supplicant/src/utils/common.c

printf_decode escapes a SSID for returning in scan results

wpa_config_parse_string reads a string from the config or the socket. It might be nicer to use the printf encoded P"I \xf0\x9f\xa6\x80 rust" style but I could not find a decent encoder.

The corresponding c code for encoding and decoding them can be found in
wpa_supplicant/src/utils/common.c

printf_decode escapes a SSID for returning in scan results

wpa_config_parse_string reads a string from the config or the socket. It
might be nicer to use the printf encoded P"I \xf0\x9f\xa6\x80 rust"
style but I could not find a decent encoder.
@aj-bagwell
Copy link
Contributor Author

There are probably still issues as it is possible to have an SSID that is not valid unicode, but I don't know support that without breaking the API.

I did not check the access point side of things so it is possible that there are more places there that need to deal with encoding better.

I feel slightly dirty overriding clippy about using actual tabs in the example in the doc test.

Let me know if there are any issue or changes you would like.

Add helper methods for reading a line from the socket, and for sending a
request and waiting for the response.
It adds a debug log message if there is no listener for the boradcasts.
This is to allow the runner to keep going if there is an issue with any
single response from the wpa_supplicant
This replaces the INI config parser from the config crate with a
simplified parser that only support k=v pairs, but does proper printf
unsecaping for non printable/on ASCII characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant