[PATCH] Fixed D-BUS PSK parameter
Fabien Marotte
fabienx.marotte
Wed Nov 24 04:09:06 PST 2010
On 11/24/2010 01:58 AM, Sam Leffler wrote:
> On Tue, Nov 23, 2010 at 1:30 AM, Fabien Marotte
> <fabienx.marotte at linux.intel.com> wrote:
>> When creating a network with AddNetwork() method in D-BUS,
>> wpa_supplicant adds double quotes to some parameters.
>> For PSK parameter, these double quotes are necessary if the
>> network is used in Managed mode, but should not be added if the
>> network is used in Master Mode.
>>
>> With this patch wpa_supplicant doesn't add the double quotes
>> automatically.
>>
>> Signed-off-by: Fabien Marotte<fabienx.marotte at linux.intel.com>
>> ---
>> wpa_supplicant/dbus/dbus_new_handlers.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
>> index 0ad51a0..7288e42 100644
>> --- a/wpa_supplicant/dbus/dbus_new_handlers.c
>> +++ b/wpa_supplicant/dbus/dbus_new_handlers.c
>> @@ -192,7 +192,7 @@ DBusMessage * wpas_dbus_error_invalid_args(DBusMessage *message,
>> static const char *dont_quote[] = {
>> "key_mgmt", "proto", "pairwise", "auth_alg", "group", "eap",
>> "opensc_engine_path", "pkcs11_engine_path", "pkcs11_module_path",
>> - "bssid", NULL
>> + "bssid", "psk", NULL
>> };
>>
>> static dbus_bool_t should_quote_opt(const char *key)
>> --
>> 1.7.0.4
>
> This appears to break compatibility with existing users of the new d-dbus api.
I agree.
I workaround that by changing my code to send either psk as a string
when it is an "ascii string" (and so add the double quotes) or in a
byteArray when it is an hex string (and so don't add double quotes).
>
> -Sam
>
More information about the Hostap
mailing list