shill: WiFi: Separate out EAP Event tracking

Separate EAP event tracking into a separate class, so it can be
used by more than one device type.  This also makes unit testing
slightly simpler.  While here also move the code that extracts
remote certification to another WPASupplicant static method.

BUG=chromium:224509
TEST=Unit tests

Change-Id: I7f4e7f5e03044f3f21dc179ea13878add5ae1c9d
Reviewed-on: https://gerrit.chromium.org/gerrit/47010
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
diff --git a/wpa_supplicant.h b/wpa_supplicant.h
index 695424d..a47c67d 100644
--- a/wpa_supplicant.h
+++ b/wpa_supplicant.h
@@ -142,6 +142,14 @@
       const EapCredentials &eap, CertificateFile *certificate_file,
       NSS *nss, const std::vector<char> nss_identifier,
       std::map<std::string, DBus::Variant> *params);
+
+  // Retrieve the |subject| and |depth| of an a remote certifying entity,
+  // as contained the the |properties| to a Certification event from
+  // wpa_supplicant.  Returns true if an |subject| and |depth| were
+  // extracted successfully, false otherwise.
+  static bool ExtractRemoteCertification(
+      const std::map<std::string, DBus::Variant> &properties,
+      std::string *subject, uint32 *depth);
 };
 
 }  // namespace shill