summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/shill_manager_client.h
diff options
context:
space:
mode:
authorgspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 04:05:01 +0000
committergspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 04:05:01 +0000
commitae1ad6f08845db9738716705181841a3e5356d34 (patch)
treede1bfe814b8d5ce276be2d341a3ddec53ce1f3c5 /chromeos/dbus/shill_manager_client.h
parentf0cee37fb866c757def9e9e6d574ce3d9345ac52 (diff)
downloadchromium_src-ae1ad6f08845db9738716705181841a3e5356d34.zip
chromium_src-ae1ad6f08845db9738716705181841a3e5356d34.tar.gz
chromium_src-ae1ad6f08845db9738716705181841a3e5356d34.tar.bz2
Add missing bssid and ssid args to shill client interface.
Also, merged the common "verification" parameters into a separate struct so we don't need so many arguments. BUG=chromium:237289 Review URL: https://chromiumcodereview.appspot.com/14957009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/shill_manager_client.h')
-rw-r--r--chromeos/dbus/shill_manager_client.h57
1 files changed, 38 insertions, 19 deletions
diff --git a/chromeos/dbus/shill_manager_client.h b/chromeos/dbus/shill_manager_client.h
index 80116bd..f1b4d8c 100644
--- a/chromeos/dbus/shill_manager_client.h
+++ b/chromeos/dbus/shill_manager_client.h
@@ -63,6 +63,38 @@ class CHROMEOS_EXPORT ShillManagerClient {
virtual ~TestInterface() {}
};
+ // Properties used to verify the origin device.
+ struct VerificationProperties {
+ VerificationProperties();
+ ~VerificationProperties();
+
+ // A string containing a PEM-encoded X.509 certificate for use in verifying
+ // the signed data.
+ std::string certificate;
+
+ // A string containing a PEM-encoded RSA public key to be used to compare
+ // with the one in signedData
+ std::string public_key;
+
+ // A string containing a base64-encoded random binary data for use in
+ // verifying the signed data.
+ std::string nonce;
+
+ // A string containing the identifying data string signed by the device.
+ std::string signed_data;
+
+ // A string containing the serial number of the device.
+ std::string device_serial;
+
+ // A string containing the SSID of the device. Only set if the device has
+ // already been setup once.
+ std::string device_ssid;
+
+ // A string containing the BSSID of the device. Only set if the device has
+ // already been setup.
+ std::string device_bssid;
+ };
+
virtual ~ShillManagerClient();
// Factory function, creates a new instance which is owned by the caller.
@@ -142,11 +174,7 @@ class CHROMEOS_EXPORT ShillManagerClient {
// Verify that the given data corresponds to a trusted device, and return true
// to the callback if it is.
- virtual void VerifyDestination(const std::string& certificate,
- const std::string& public_key,
- const std::string& nonce,
- const std::string& signed_data,
- const std::string& device_serial,
+ virtual void VerifyDestination(const VerificationProperties& properties,
const BooleanCallback& callback,
const ErrorCallback& error_callback) = 0;
@@ -155,11 +183,7 @@ class CHROMEOS_EXPORT ShillManagerClient {
// by the given |service_path|, encrypted using the |public_key| for the
// trusted device. If the device is not trusted, return the empty string.
virtual void VerifyAndEncryptCredentials(
- const std::string& certificate,
- const std::string& public_key,
- const std::string& nonce,
- const std::string& signed_data,
- const std::string& device_serial,
+ const VerificationProperties& properties,
const std::string& service_path,
const StringCallback& callback,
const ErrorCallback& error_callback) = 0;
@@ -167,15 +191,10 @@ class CHROMEOS_EXPORT ShillManagerClient {
// Verify that the given data corresponds to a trusted device, and return the
// |data| encrypted using the |public_key| for the trusted device. If the
// device is not trusted, return the empty string.
- virtual void VerifyAndEncryptData(
- const std::string& certificate,
- const std::string& public_key,
- const std::string& nonce,
- const std::string& signed_data,
- const std::string& device_serial,
- const std::string& data,
- const StringCallback& callback,
- const ErrorCallback& error_callback) = 0;
+ virtual void VerifyAndEncryptData(const VerificationProperties& properties,
+ const std::string& data,
+ const StringCallback& callback,
+ const ErrorCallback& error_callback) = 0;
// For each technology present, connect to the "best" service available.
// Called once the user is logged in and certificates are loaded.