@@ -116,6 +116,7 @@ struct eap_tls_state {
bool expecting_frag_ack:1;
bool tunnel_ready:1;
bool tls_session_resumed:1;
+ bool tls_cache_disabled:1;
struct l_queue *ca_cert;
struct l_certchain *client_cert;
@@ -179,7 +180,8 @@ static void __eap_tls_common_state_reset(struct eap_state *eap)
if (eap_tls->tls_session_resumed)
l_warn("EAP: method did not finish after successful TLS"
- " session resumption.");
+ " session resumption. If this repeats consider"
+ " setting [Settings].DisableEAPTLSCache.");
}
eap_tls->tls_session_resumed = false;
@@ -691,7 +693,7 @@ static bool eap_tls_tunnel_init(struct eap_state *eap)
if (eap_tls->domain_mask)
l_tls_set_domain_mask(eap_tls->tunnel, eap_tls->domain_mask);
- if (!eap_tls_session_cache_load)
+ if (!eap_tls_session_cache_load || eap_tls->tls_cache_disabled)
goto start;
if (!eap_tls_session_cache)
@@ -1040,6 +1042,13 @@ int eap_tls_common_settings_check(struct l_settings *settings,
return -EINVAL;
}
+ if (l_settings_has_key(settings, "Settings", "DisableEAPTLSCache") &&
+ !l_settings_get_bool(settings, "Settings",
+ "DisableEAPTLSCache", NULL)) {
+ l_error("Can't parse DisableEAPTLSCache");
+ return -EINVAL;
+ }
+
return 0;
}
@@ -1051,6 +1060,7 @@ bool eap_tls_common_settings_load(struct eap_state *eap,
struct eap_tls_state *eap_tls;
char setting_key[72];
char *domain_mask_str;
+ bool bool_val;
L_AUTO_FREE_VAR(char *, value) = NULL;
@@ -1080,6 +1090,10 @@ bool eap_tls_common_settings_load(struct eap_state *eap,
l_free(domain_mask_str);
}
+ eap_tls->tls_cache_disabled =
+ l_settings_get_bool(settings, "Settings", "DisableEAPTLSCache",
+ &bool_val) && bool_val;
+
eap_set_data(eap, eap_tls);
return true;
@@ -174,6 +174,16 @@ The group ``[Settings]`` contains general settings.
Properly configured Access Points will typically update this setting
appropriately via Transition Disable indications. User customization
of this value is thus typically not required.
+ * - DisableEAPTLSCache
+ - Values: true, **false**
+
+ Disables TLS session caching in EAP-TLS, EAP-TTLS and EAP-PEAP.
+ Some network authenticators may be misconfigured in a way that TLS
+ session resumption is allowed but actually attempting it will cause
+ the EAP method to fail or time out. In that case, assuming the
+ credentials and other settings are correct, every other connection
+ attempt will fail as sessions are cached and forgotten in alternating
+ attempts. Use this setting to disable caching for this network.
Network Authentication Settings
-------------------------------