[wpa_supplicant] essid with non-ascii characters

Jouni Malinen j at w1.fi
Sat Aug 4 04:52:47 EDT 2012

On Wed, Aug 01, 2012 at 10:58:48AM +0200, Jouke Witteveen wrote:
> Good suggestion, although mapping '\n', '\t', '\0' to ' ' and
> accepting ' ' in the config file as wildcard for the three would be
> simpler from my point of view as a network utility writer. Is there a
> better way to get a list of SSID's for a connection manager (from the
> shell)?

That does not work with drivers using ap_scan=2 and I'm not sure I would
really like to add this type of mechanism since it adds more driver
specific confusion. Providing convenient means of showing the SSID as a
hexdump or escaped string would be a better option.

> The printf trick works, even for the three troublesome characters.
> Their problem is one of output formatting. I think wpa_supplicant
> might already fail to connect to an AP with a '\0' in its SSID, but I
> wouldn't spend too much time investigating such bad behaviour.

wpa_supplicant does not use SSID as a string and can handle '\0' within
the SSID. I would not call this bad behavior, though.

> I would like to propose some patches, but I couldn't find the place
> where characters become '_' in my first search through the codebase.
> Perhaps someone more familiar with the code can point out where to
> look.

wpa_ssid_txt() in src/utils/common.c

Jouni Malinen                                            PGP id EFC895FA

More information about the HostAP mailing list