Generated configuration file is wrong if we enter wpa 1/2 Preshared Key in hexadecimal

Bug #477323 reported by Martin
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
wicd
Fix Released
Low
David Paleino

Bug Description

If i enter wpa 1/2 Preshared Key in hexadecimal it is leading to something like this in /var/lib/wicd/configurations/0001e3506924:
psk="000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"

But with these quotes around wpa_supplicant will fail...
If I remove the quotes so that it looks like this:
psk=000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

and start manually: wpa_supplicant -c /var/lib/wicd/configurations/0001e3506924 it works

Try it out!!!

It sounds similiar to an other bug. There was suggested to write quotes around - but this is completely the wrong solution in my case.

wicd: 1.6.2.2-1~bpo50+1
wpasupplicant: 0.6.4-3
Distro: Debian Lenny and backported wicd

Related branches

Revision history for this message
Martin (martin-schmidt13) wrote :

if i change in /etc/wicd/encryption/templates/wpa-psk

psk="$_APSK" to psk=$_APSK

it works for me. So this would be the patch...

Revision history for this message
Adam Blackburn (adamblackburn) wrote :

Have you tried using the WPA Passphrase encryption?

Revision history for this message
Martin (martin-schmidt13) wrote :

No. I haven't. For this i had to change the router setup which is working very fine with my own setup on another computer (Never change a running system. My hex key is not derived from a passphrase but generated via /dev/urandom for security reasons)

Sorry for writing so much, but the reason for trying out wicd was to setup a second laptop for my girlfriend in my established very well working network with a special setup.

If it's imported for you i could test with wpa passphrase but i think the setup with wpa-psk should work !!!

Revision history for this message
Andrew Psaltis (nacl) wrote :

The terminology could in fact could be wrong in the template name.

The "WPA 1/2 (Passphrase)" template doesn't use the quotes, as you have suggested would be a solution to the problem.

Try it, it probably will work.

Revision history for this message
Martin (martin-schmidt13) wrote :

diff wpa wpa-psk shows:
1c1
< name = WPA 1/2 (Passphrase)
---
> name = WPA 1/2 (Preshared Key)
4c4
< require key *Key
---
> require apsk *Preshared_Key
14c14
< psk=$_PSK
---
> psk="$_APSK"

So I think using WPA 1/2 (Passphrase) would work in my case. But I don't understand the philosophy! Why do i have to enter a hexadecimal ("non typical passphrase") as a passphrase? I thought passphrase is for passphrases like <kfjfujfHdjfdkfj> and preshared is for keys like 0x18d348a2..... Am I completely wrong with this?

Revision history for this message
Andrew Psaltis (nacl) wrote :

As I said, the naming may be bad. Have you tried using the other template yet?

"Pre-Shared Key" probably refers to the hex blob, and "Passphrase" probably refers to an ASCII password. Chances are high that the template names will be swapped to represent this.

Revision history for this message
Martin (martin-schmidt13) wrote :

OK. I tried it out. Before writing this e-mail i used option wpa1/2 passphrase and entered my hex key like 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f in the box and it works now.
Unfortunately i had to switch on my ssid broadcast. With hidden ssid it does not working. But i think thats another problem :-)

Revision history for this message
Tom (2-launchpad-pertho-net) wrote :

I can confirm this also. I wanted to only stick in a hex PSK for my WPA2 wifi point and WICD wouldn't authenticate me properly. So I edit /etc/wicd/encryption/templates/wpa-psk and remove the quotes so the line reads: psk=$_APSK

Now it works and I don't have to use a passphrase which is stored in the clear.

v1.70 also has this bugged template. Is this by design? It's very confusing for users because a non-passphrase key is assumed to be hexadecimal. (I don't think I've seen an ASCII non-passphrase PSK!)

Could one of the developers clarify this? If we don't want to use the Passphrase facility and want to put in the key as generated by wpa_passphrase, wouldn't "WPA 1/2 (Passphrase)" be the place to do it?

I vote for the patch in 2nd comment down. Remove the quotes after psk= ... it breaks wpa_supplicant's way to authenticate with the wifi point.

Revision history for this message
David Paleino (dpaleino) wrote :

I just renamed the templates (not the files, just the name shown) so that it's clearer (I hope).

Revision 721.

Changed in wicd:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → David Paleino (dpaleino)
milestone: none → 1.7.2
David Paleino (dpaleino)
Changed in wicd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.