shill: Connect manager dbus calls to calls to the crypto-shim
Implement the logic in the manager which looks up the currently
connected WiFi service, and verifies it as a valid destination. It does
this by delegating to a CryptoUtilProxy which manages the interface to
the crypto-util.
BUG=chromium:221168
TEST=Unit tests pass, added a new one that tests the linkage between the
manager and the CryptoUtilProxy.
Change-Id: I3ed2608652463f04060b712adcf17e26676c3d9d
Reviewed-on: https://gerrit.chromium.org/gerrit/46447
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
diff --git a/manager.h b/manager.h
index 86e12c6..ee27788 100644
--- a/manager.h
+++ b/manager.h
@@ -18,6 +18,7 @@
#include <base/gtest_prod_util.h> // for FRIEND_TEST_ALL_PREFIXES
#include <gtest/gtest_prod.h> // for FRIEND_TEST
+#include "shill/crypto_util_proxy.h"
#include "shill/device.h"
#include "shill/device_info.h"
#include "shill/event_dispatcher.h"
@@ -443,6 +444,9 @@
void OnSuspendImminent(int suspend_id);
void OnSuspendActionsComplete(int suspend_id, const Error &error);
+ void VerifyToEncryptLink(std::string public_key, std::string data,
+ ResultStringCallback cb, const Error &error,
+ bool success);
// For unit testing.
void set_metrics(Metrics *metrics) { metrics_ = metrics; }
@@ -517,6 +521,9 @@
// Maps tags to callbacks for monitoring default service changes.
std::map<int, ServiceCallback> default_service_callbacks_;
int default_service_callback_tag_;
+
+ // Delegate to handle destination verification operations for the manager.
+ scoped_ptr<CryptoUtilProxy> crypto_util_proxy_;
};
} // namespace shill