[pkg-wpa-devel] r906 - in /wpasupplicant/trunk/debian: changelog ifupdown/functions.sh
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Sat Dec 1 10:09:50 UTC 2007
Author: kelmo-guest
Date: Sat Dec 1 10:09:50 2007
New Revision: 906
URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=906
Log:
calculate key length once at start of function and s/${#KEY}/$KEY_LEN/g
Modified:
wpasupplicant/trunk/debian/changelog
wpasupplicant/trunk/debian/ifupdown/functions.sh
Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=906&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Sat Dec 1 10:09:50 2007
@@ -1,4 +1,4 @@
-wpasupplicant (0.6.1~git20071119-2) UNRELEASED; urgency=low
+wpasupplicant (0.6.1~git20071119-2~kelmo1) unstable; urgency=low
* Allow "wpa-key-mgmt NONE" to form a network block via the wpa_cli calls in
wpa_conf() of functions.sh.
@@ -8,7 +8,7 @@
length of at least 5.
* Check wpa_cli return value in wpa_cli() function of functions.sh.
- -- Kel Modderman <kel at otaku42.de> Fri, 30 Nov 2007 21:18:23 +1000
+ -- Kel Modderman <kel at otaku42.de> Fri, 30 Nov 2007 22:10:02 +1000
wpasupplicant (0.6.1~git20071119-1) unstable; urgency=low
Modified: wpasupplicant/trunk/debian/ifupdown/functions.sh
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/ifupdown/functions.sh?rev=906&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/ifupdown/functions.sh (original)
+++ wpasupplicant/trunk/debian/ifupdown/functions.sh Sat Dec 1 10:09:50 2007
@@ -420,7 +420,9 @@
return 0
fi
- local KEY KEY_TYPE ENC_TYPE
+ local KEY KEY_LEN KEY_TYPE ENC_TYPE
+
+ KEY_LEN="${#KEY}"
case "$1" in
'"'*'"')
@@ -446,7 +448,7 @@
if [ "$ENC_TYPE" = "WEP" ]; then
if ishex "$KEY"; then
- case "${#KEY}" in
+ case "$KEY_LEN" in
10|26|32|58)
# 64/128/152/256-bit WEP
KEY_TYPE="raw"
@@ -460,14 +462,14 @@
fi
if [ "$KEY_TYPE" = "ascii" ]; then
- if [ "${#KEY}" -lt "5" ]; then
- wpa_msg stderr "WARNING: plaintext or ascii WEP key has ${#KEY} characters,"
+ if [ "$KEY_LEN" -lt "5" ]; then
+ wpa_msg stderr "WARNING: plaintext or ascii WEP key has $KEY_LEN characters,"
wpa_msg stderr "it must have at least 5 to be valid."
fi
fi
elif [ "$ENC_TYPE" = "WPA" ]; then
if ishex "$KEY"; then
- case "${#KEY}" in
+ case "$KEY_LEN" in
64)
# 256-bit WPA
KEY_TYPE="raw"
@@ -481,8 +483,8 @@
fi
if [ "$KEY_TYPE" = "ascii" ]; then
- if [ "${#KEY}" -lt "8" ] || [ "${#KEY}" -gt "63" ]; then
- wpa_msg stderr "WARNING: plaintext or ascii WPA key has ${#KEY} characters,"
+ if [ "$KEY_LEN" -lt "8" ] || [ "$KEY_LEN" -gt "63" ]; then
+ wpa_msg stderr "WARNING: plaintext or ascii WPA key has $KEY_LEN characters,"
wpa_msg stderr "it must have between 8 and 63 to be valid."
wpa_msg stderr "If the WPA key is a 256-bit hexadecimal key, it must have"
wpa_msg stderr "exactly 64 characters."
More information about the Pkg-wpa-devel
mailing list