On Tue, Oct 22, 2019 at 09:33:25AM -0400, M. Ranganathan wrote: > The access point is using psk. Here is its configuration (note that I > have limited ssid to 4 characters): > sta1 is the configurator: > > Its configuration is as follows: > ctrl_interface=/var/run/wpa_supplicant1 > ctrl_interface_group=0 > network={ > ssid="012a" > psk="12345678" > 4. Configurator: self sign the configurator > wpa_cli -p /var/run/wpa_supplicant1 dpp_configurator_sign > conf=sta-psk psk=29153c1e60c0e50afa47530eb7b6db1193b0131616c139e9f1785d174861cca7 > ssid=012a configurator=1' Please note that the psk and ssid parameter here take in a hexdump value of the passphrase, i.e., that ssid=012a encodes a two octet, not four octet, SSID.. This should have been using ssid=30313261 if you want the SSID to be a four octet string "012a". > 9. Configurator: Send provisioning request to enrollee. > wpa_cli -p /var/run/wpa_supplicant1 dpp_auth_init peer=1 conf=sta-psk > ssid=012a psk=.... configurator=1 Same here. > 1. After making the suggested fix to wpa_supplicant/config_file.c, the > configuration is written out correctly i.e. for the enrollee: No it is not.. In this case, the DPP Configurator was asked to set the SSID to a two octet string 0x01 0x2a which is encoded as ssid=012a in wpa_supplicant configuration. > ssid="012a" In other words, the patch broke this.. ssid=012a would have been correct. ssid="012a" would show here had the Configurator been set up correctly using ssid=30313261 as described above. > 2. If I change my ssid to something long, 012abcdef, I observe the > following at the rnrollee: > ssid="012affff66666263ffff66666465" This does actually show up a real bug, but in the JSON string escaping mechanism.. I'll fix that. Anyway, your example should have used ssid=303132616263646566 to get the SSID value that I think you were trying to use (and that one would not trigger the JSON bug either since there are no non-ASCII characters in the string encoded here in hex format). -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap