aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2015-01-27 13:40:23 -0800
committerDmitry Shmidt <dimitrysh@google.com>2015-01-28 14:12:43 -0800
commit807291d85bf857320aff6a8ade38c5f622ab9df8 (patch)
tree7ddeb2e936e41a828ec012cc5265e1b55541dbaa /src/radius
parent2f74e36e84064ffa32f82f3decf36b653c7e4fad (diff)
downloadandroid_external_wpa_supplicant_8-807291d85bf857320aff6a8ade38c5f622ab9df8.tar.gz
android_external_wpa_supplicant_8-807291d85bf857320aff6a8ade38c5f622ab9df8.tar.bz2
android_external_wpa_supplicant_8-807291d85bf857320aff6a8ade38c5f622ab9df8.zip
Cumulative patch from commit 3f56a2b7460a57a2b68b48b936be134bf04aa36d (DO NOT MERGE)
3f56a2b Ignore pmf=1 default if driver does not support PMF fa38860 nl80211: Fix build with libnl 1.1 937403b Update copyright notices for the new year 2015 399e613 Add Suite B AKMs to key_mgmt capability list 5e3b519 Add Suite B 192-bit AKM 97ae35a Add HMAC-SHA384 98cd3d1 Preparations for variable length KCK and KEK 30bff1d Extend AES-CMAC routines to support 256-bit keys 86f9b1c nl80211: Fix default group key management index configuration b5f045d Show supported group_mgmt capabilities 893e152 Interworking: More debug messages f45bae5 Interworking: Add logging to track nai_realm_find_eap failures 5a5aab7 Interworking: Remove unnecessary NULL check 400de9b hostapd: Debug messages for dodgy RADIUS servers ad905e4 wpa_gui: Sort frequency and signal numerically in the scan results dialog c35e35e Add passive_scan configuration parameter bff162a P2P: Fix NULL pointer dereference with SD query cancellation 630b323 nl80211: Increase netlink receive buffer size Change-Id: I32d4bd934ad76e24c646e9925bb839b1ba2a148e Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/radius')
-rw-r--r--src/radius/radius.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/radius/radius.c b/src/radius/radius.c
index 6eba2eb6..8d878a4b 100644
--- a/src/radius/radius.c
+++ b/src/radius/radius.c
@@ -993,13 +993,16 @@ static u8 * decrypt_ms_key(const u8 *key, size_t len,
/* key: 16-bit salt followed by encrypted key info */
- if (len < 2 + 16)
+ if (len < 2 + 16) {
+ wpa_printf(MSG_DEBUG, "RADIUS: %s: Len is too small: %d",
+ __func__, (int) len);
return NULL;
+ }
pos = key + 2;
left = len - 2;
if (left % 16) {
- wpa_printf(MSG_INFO, "Invalid ms key len %lu",
+ wpa_printf(MSG_INFO, "RADIUS: Invalid ms key len %lu",
(unsigned long) left);
return NULL;
}
@@ -1034,7 +1037,7 @@ static u8 * decrypt_ms_key(const u8 *key, size_t len,
}
if (plain[0] == 0 || plain[0] > plen - 1) {
- wpa_printf(MSG_INFO, "Failed to decrypt MPPE key");
+ wpa_printf(MSG_INFO, "RADIUS: Failed to decrypt MPPE key");
os_free(plain);
return NULL;
}
@@ -1123,6 +1126,10 @@ radius_msg_get_ms_keys(struct radius_msg *msg, struct radius_msg *sent_msg,
sent_msg->hdr->authenticator,
secret, secret_len,
&keys->send_len);
+ if (!keys->send) {
+ wpa_printf(MSG_DEBUG,
+ "RADIUS: Failed to decrypt send key");
+ }
os_free(key);
}
@@ -1134,6 +1141,10 @@ radius_msg_get_ms_keys(struct radius_msg *msg, struct radius_msg *sent_msg,
sent_msg->hdr->authenticator,
secret, secret_len,
&keys->recv_len);
+ if (!keys->recv) {
+ wpa_printf(MSG_DEBUG,
+ "RADIUS: Failed to decrypt recv key");
+ }
os_free(key);
}