aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2015-04-28 10:34:29 -0700
committerDmitry Shmidt <dimitrysh@google.com>2015-04-28 10:34:29 -0700
commit1d755d025b206e22b06aeb322e25a79f98ca7777 (patch)
tree64b3363a5e8e9fa8ee1f52b868300030584cc109 /src/eap_peer
parent1eb02edb319d462031f0c2f1f3548498558e95a5 (diff)
downloadandroid_external_wpa_supplicant_8-1d755d025b206e22b06aeb322e25a79f98ca7777.tar.gz
android_external_wpa_supplicant_8-1d755d025b206e22b06aeb322e25a79f98ca7777.tar.bz2
android_external_wpa_supplicant_8-1d755d025b206e22b06aeb322e25a79f98ca7777.zip
Cumulative patch from commit 01a025937c67f0eca6021d94b8ec3b144f8b1730
01a0259 WPS: Add support for 60 GHz band 0ef1e29 WPS: Fix shorter authentication timeout during no-SelReg iteration 3465176 nl80211: Verify that cipher suite conversion succeeds a250722 Try to set PMK only with key mgmt offload support in the driver 4a7ce98 Make IPv6 NA multicast-to-unicast conversion configurable 9f390f4 Interworking: Fix network selection warning without SIM/USIM support a0ad9e8 Remove WPA per-VLAN groups when no more stations remain 87b5b53 Make VLAN ID available in STA info over control interface 5678a2d P2P: Allow wpa_supplicant to start if social channels are not supported 209214b vlan: Move CONFIG_FULL_DYNAMIC_VLAN includes to proper places a6da824 Do not use C++ reserved words as variable names eaa3728 wpa_gui: Themed icon loader 9a3cb41 Fix wpa_priv (CONFIG_PRIVSEP=y) build 8b423ed Declare all read only data structures as const fd4fb28 OpenSSL: Try to ensure we don't throw away the PIN unnecessarily fabc6dd mesh: Retransmit the last Commit Message in the Committed state 068669f vlan: Verify RADIUS returned VLAN-ID and dynamic_vlan=required 5add410 WPS: Use shorter authentication timeout during no-SelReg iteration e7d2034 WPS: Enforce five second minimum time before AP iteration bd143cc Remove trailing whitespace from Makefile 74802c0 P2P: Do not create a P2P Device interface if P2P is disabled 579674e Document p2p_disabled option in wpa_supplicant.conf 8ea8a89 nl80211: Extend unique MAC address assignment for station iftype Change-Id: I8bc8a63f37c0892b83376b9d5a5859827ae50554 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/eap_peer')
-rw-r--r--src/eap_peer/eap.c2
-rw-r--r--src/eap_peer/eap.h2
-rw-r--r--src/eap_peer/eap_i.h2
-rw-r--r--src/eap_peer/eap_tls_common.c27
4 files changed, 15 insertions, 18 deletions
diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
index fc4af953..1dbe003e 100644
--- a/src/eap_peer/eap.c
+++ b/src/eap_peer/eap.c
@@ -1911,7 +1911,7 @@ static void eap_peer_sm_tls_event(void *ctx, enum tls_event ev,
* structure remains alive while the EAP state machine is active.
*/
struct eap_sm * eap_peer_sm_init(void *eapol_ctx,
- struct eapol_callbacks *eapol_cb,
+ const struct eapol_callbacks *eapol_cb,
void *msg_ctx, struct eap_config *conf)
{
struct eap_sm *sm;
diff --git a/src/eap_peer/eap.h b/src/eap_peer/eap.h
index 702463b9..1a645af8 100644
--- a/src/eap_peer/eap.h
+++ b/src/eap_peer/eap.h
@@ -307,7 +307,7 @@ struct eap_config {
};
struct eap_sm * eap_peer_sm_init(void *eapol_ctx,
- struct eapol_callbacks *eapol_cb,
+ const struct eapol_callbacks *eapol_cb,
void *msg_ctx, struct eap_config *conf);
void eap_peer_sm_deinit(struct eap_sm *sm);
int eap_peer_sm_step(struct eap_sm *sm);
diff --git a/src/eap_peer/eap_i.h b/src/eap_peer/eap_i.h
index 2d7fdea2..5f8b5fa7 100644
--- a/src/eap_peer/eap_i.h
+++ b/src/eap_peer/eap_i.h
@@ -328,7 +328,7 @@ struct eap_sm {
/* not defined in RFC 4137 */
Boolean changed;
void *eapol_ctx;
- struct eapol_callbacks *eapol_cb;
+ const struct eapol_callbacks *eapol_cb;
void *eap_method_priv;
int init_phase2;
int fast_reauth;
diff --git a/src/eap_peer/eap_tls_common.c b/src/eap_peer/eap_tls_common.c
index 15c1bac5..b4a5b1f3 100644
--- a/src/eap_peer/eap_tls_common.c
+++ b/src/eap_peer/eap_tls_common.c
@@ -196,28 +196,25 @@ static int eap_tls_init_connection(struct eap_sm *sm,
}
res = tls_connection_set_params(data->ssl_ctx, data->conn, params);
- if (res == TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED) {
+ if (res == TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN) {
/*
- * At this point with the pkcs11 engine the PIN might be wrong.
- * We reset the PIN in the configuration to be sure to not use
- * it again and the calling function must request a new one.
+ * At this point with the pkcs11 engine the PIN is wrong. We
+ * reset the PIN in the configuration to be sure to not use it
+ * again and the calling function must request a new one.
*/
+ wpa_printf(MSG_INFO,
+ "TLS: Bad PIN provided, requesting a new one");
os_free(config->pin);
config->pin = NULL;
+ eap_sm_request_pin(sm);
+ sm->ignore = TRUE;
+ } else if (res == TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED) {
+ wpa_printf(MSG_INFO, "TLS: Failed to initialize engine");
} else if (res == TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED) {
wpa_printf(MSG_INFO, "TLS: Failed to load private key");
- /*
- * We do not know exactly but maybe the PIN was wrong,
- * so ask for a new one.
- */
- os_free(config->pin);
- config->pin = NULL;
- eap_sm_request_pin(sm);
sm->ignore = TRUE;
- tls_connection_deinit(data->ssl_ctx, data->conn);
- data->conn = NULL;
- return -1;
- } else if (res) {
+ }
+ if (res) {
wpa_printf(MSG_INFO, "TLS: Failed to set TLS connection "
"parameters");
tls_connection_deinit(data->ssl_ctx, data->conn);