shill: WiFi: Emit WiFiService errors on EAP Failures

Do not wait for wpa_supplicant to timeout on EAP failures.
Instead, report EAP failures immediately by setting the
most specific failure possible on the service and disconnecting.
By doing so, this empowers the UI (and in turn the user) to
take appropriate action to correct the authentication problem.

CQ-DEPEND=Ifae8eeb45c1f9ef5a9f0406482a15c0c9adca12c
BUG=chromium-os:31466
TEST=Unit tests, network_WiFiSecMat/network_WiFiSecMat.073CheckWPA_1x_TTLS,
network_WiFiSecMat/network_WiFiSecMat.019CheckWPA_1x_AES, observing that
the service enters the Failed state and the error is set appropriately
to the cause of failure.

Change-Id: I1d019f3148c64ed41d173aeae0a91409eb73e906
Reviewed-on: https://gerrit.chromium.org/gerrit/39026
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
diff --git a/supplicant_interface_proxy.cc b/supplicant_interface_proxy.cc
index ad581a2..8df3727 100644
--- a/supplicant_interface_proxy.cc
+++ b/supplicant_interface_proxy.cc
@@ -173,6 +173,13 @@
   wifi_->Certification(properties);
 }
 
+void SupplicantInterfaceProxy::Proxy::EAP(
+    const string &status, const string &parameter) {
+  SLOG(DBus, 2) << __func__ << ": status " << status
+                << ", parameter " << parameter;
+  wifi_->EAPEvent(status, parameter);
+}
+
 void SupplicantInterfaceProxy::Proxy::BSSRemoved(const ::DBus::Path &BSS) {
   SLOG(DBus, 2) << __func__;
   wifi_->BSSRemoved(BSS);