aboutsummaryrefslogtreecommitdiff
path: root/dbus/cryptohome
diff options
context:
space:
mode:
authorAlex Deymo <deymo@chromium.org>2015-08-26 19:38:43 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-08-27 21:27:43 -0700
commit9bbde1b1afee1529c6ed7b6569630b591c60ddb4 (patch)
tree8a1437afe3720f1f6405d2527748b77bf19e50c4 /dbus/cryptohome
parent383376f7a551a823d4300188c5d41f19dc16dc00 (diff)
downloadsystem_api-9bbde1b1afee1529c6ed7b6569630b591c60ddb4.tar.gz
Split DBus constants per daemon.
The service_constants.h file defines the DBus method names, property names, signal names, property values and other DBus string constants that define the API from Chromium to the Chromium OS system. It was also the main way daemons in Chromium OS could talk to other daemons, by sending DBus method calls using the method and interface names defined here. We are moving towards generated proxies for DBus communication packaged in client libraries. Each daemon should expose a client library use to talk to that daemon. The code generated from the .xml description covers the interface names, methods names and property names, but doesn't include property values and other required constants involved in the interface but not expressed in the .xml file. This patch splits the DBus constants used by Chromium and other daemons in one file per daemon, that will eventually be part of the client library presented by that daemon. CQ-DEPEND=CL:295757 BUG=b:23560718 TEST=emerge-link system_api update_engine Change-Id: I726633454ef248d280e0a21c534da6c42b1d53ab Reviewed-on: https://chromium-review.googlesource.com/295756 Commit-Ready: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org>
Diffstat (limited to 'dbus/cryptohome')
-rw-r--r--dbus/cryptohome/dbus-constants.h137
1 files changed, 137 insertions, 0 deletions
diff --git a/dbus/cryptohome/dbus-constants.h b/dbus/cryptohome/dbus-constants.h
new file mode 100644
index 0000000..44f8ff7
--- /dev/null
+++ b/dbus/cryptohome/dbus-constants.h
@@ -0,0 +1,137 @@
+// Copyright 2015 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYSTEM_API_DBUS_CRYPTOHOME_DBUS_CONSTANTS_H_
+#define SYSTEM_API_DBUS_CRYPTOHOME_DBUS_CONSTANTS_H_
+
+namespace cryptohome {
+const char kCryptohomeInterface[] = "org.chromium.CryptohomeInterface";
+const char kCryptohomeServicePath[] = "/org/chromium/Cryptohome";
+const char kCryptohomeServiceName[] = "org.chromium.Cryptohome";
+// Methods
+const char kCryptohomeAsyncAddKey[] = "AsyncAddKey";
+const char kCryptohomeCheckKey[] = "CheckKey";
+const char kCryptohomeMigrateKey[] = "MigrateKey";
+const char kCryptohomeRemove[] = "Remove";
+const char kCryptohomeGetSystemSalt[] = "GetSystemSalt";
+const char kCryptohomeGetSanitizedUsername[] = "GetSanitizedUsername";
+const char kCryptohomeIsMounted[] = "IsMounted";
+const char kCryptohomeMount[] = "Mount";
+const char kCryptohomeMountGuest[] = "MountGuest";
+const char kCryptohomeMountPublic[] = "MountPublic";
+const char kCryptohomeUnmount[] = "Unmount";
+const char kCryptohomeTpmIsReady[] = "TpmIsReady";
+const char kCryptohomeTpmIsEnabled[] = "TpmIsEnabled";
+const char kCryptohomeTpmIsOwned[] = "TpmIsOwned";
+const char kCryptohomeTpmIsBeingOwned[] = "TpmIsBeingOwned";
+const char kCryptohomeTpmGetPassword[] = "TpmGetPassword";
+const char kCryptohomeTpmCanAttemptOwnership[] = "TpmCanAttemptOwnership";
+const char kCryptohomeTpmClearStoredPassword[] = "TpmClearStoredPassword";
+const char kCryptohomePkcs11GetTpmTokenInfo[] = "Pkcs11GetTpmTokenInfo";
+const char kCryptohomePkcs11GetTpmTokenInfoForUser[] =
+ "Pkcs11GetTpmTokenInfoForUser";
+const char kCryptohomePkcs11IsTpmTokenReady[] = "Pkcs11IsTpmTokenReady";
+const char kCryptohomePkcs11IsTpmTokenReadyForUser[] =
+ "Pkcs11IsTpmTokenReadyForUser";
+const char kCryptohomeAsyncCheckKey[] = "AsyncCheckKey";
+const char kCryptohomeAsyncMigrateKey[] = "AsyncMigrateKey";
+const char kCryptohomeAsyncMount[] = "AsyncMount";
+const char kCryptohomeAsyncMountGuest[] = "AsyncMountGuest";
+const char kCryptohomeAsyncMountPublic[] = "AsyncMountPublic";
+const char kCryptohomeAsyncRemove[] = "AsyncRemove";
+const char kCryptohomeGetStatusString[] = "GetStatusString";
+const char kCryptohomeRemoveTrackedSubdirectories[] =
+ "RemoveTrackedSubdirectories";
+const char kCryptohomeAsyncRemoveTrackedSubdirectories[] =
+ "AsyncRemoveTrackedSubdirectories";
+const char kCryptohomeDoAutomaticFreeDiskSpaceControl[] =
+ "DoAutomaticFreeDiskSpaceControl";
+const char kCryptohomeAsyncDoAutomaticFreeDiskSpaceControl[] =
+ "AsyncDoAutomaticFreeDiskSpaceControl";
+const char kCryptohomeAsyncDoesUsersExist[] = "AsyncDoesUsersExist";
+const char kCryptohomeInstallAttributesGet[] = "InstallAttributesGet";
+const char kCryptohomeInstallAttributesSet[] = "InstallAttributesSet";
+const char kCryptohomeInstallAttributesCount[] = "InstallAttributesCount";
+const char kCryptohomeInstallAttributesFinalize[] =
+ "InstallAttributesFinalize";
+const char kCryptohomeInstallAttributesIsReady[] = "InstallAttributesIsReady";
+const char kCryptohomeInstallAttributesIsSecure[] =
+ "InstallAttributesIsSecure";
+const char kCryptohomeInstallAttributesIsInvalid[] =
+ "InstallAttributesIsInvalid";
+const char kCryptohomeInstallAttributesIsFirstInstall[] =
+ "InstallAttributesIsFirstInstall";
+const char kCryptohomeStoreEnrollmentState[] =
+ "StoreEnrollmentState";
+const char kCryptohomeLoadEnrollmentState[] =
+ "LoadEnrollmentState";
+const char kCryptohomeTpmIsAttestationPrepared[] = "TpmIsAttestationPrepared";
+const char kCryptohomeTpmIsAttestationEnrolled[] = "TpmIsAttestationEnrolled";
+const char kCryptohomeAsyncTpmAttestationCreateEnrollRequest[] =
+ "AsyncTpmAttestationCreateEnrollRequest";
+const char kCryptohomeAsyncTpmAttestationCreateEnrollRequestNew[] =
+ "AsyncTpmAttestationCreateEnrollRequestNew";
+const char kCryptohomeAsyncTpmAttestationEnroll[] = "AsyncTpmAttestationEnroll";
+const char kCryptohomeAsyncTpmAttestationEnrollNew[] =
+ "AsyncTpmAttestationEnrollNew";
+const char kCryptohomeAsyncTpmAttestationCreateCertRequest[] =
+ "AsyncTpmAttestationCreateCertRequest";
+const char kCryptohomeAsyncTpmAttestationCreateCertRequestByProfile[] =
+ "AsyncTpmAttestationCreateCertRequestByProfile";
+const char kCryptohomeAsyncTpmAttestationFinishCertRequest[] =
+ "AsyncTpmAttestationFinishCertRequest";
+const char kCryptohomeTpmAttestationDoesKeyExist[] =
+ "TpmAttestationDoesKeyExist";
+const char kCryptohomeTpmAttestationGetCertificate[] =
+ "TpmAttestationGetCertificate";
+const char kCryptohomeTpmAttestationGetPublicKey[] =
+ "TpmAttestationGetPublicKey";
+const char kCryptohomeTpmAttestationRegisterKey[] = "TpmAttestationRegisterKey";
+const char kCryptohomeTpmAttestationSignEnterpriseChallenge[] =
+ "TpmAttestationSignEnterpriseChallenge";
+const char kCryptohomeTpmAttestationSignSimpleChallenge[] =
+ "TpmAttestationSignSimpleChallenge";
+const char kCryptohomeTpmAttestationGetKeyPayload[] =
+ "TpmAttestationGetKeyPayload";
+const char kCryptohomeTpmAttestationSetKeyPayload[] =
+ "TpmAttestationSetKeyPayload";
+const char kCryptohomeTpmAttestationDeleteKeys[] =
+ "TpmAttestationDeleteKeys";
+const char kCryptohomeGetKeyDataEx[] = "GetKeyDataEx";
+const char kCryptohomeCheckKeyEx[] = "CheckKeyEx";
+const char kCryptohomeMountEx[] = "MountEx";
+const char kCryptohomeAddKeyEx[] = "AddKeyEx";
+const char kCryptohomeUpdateKeyEx[] = "UpdateKeyEx";
+const char kCryptohomeRemoveKeyEx[] = "RemoveKeyEx";
+const char kCryptohomeSignBootLockbox[] = "SignBootLockbox";
+const char kCryptohomeVerifyBootLockbox[] = "VerifyBootLockbox";
+const char kCryptohomeFinalizeBootLockbox[] = "FinalizeBootLockbox";
+const char kCryptohomeGetBootAttribute[] = "GetBootAttribute";
+const char kCryptohomeSetBootAttribute[] = "SetBootAttribute";
+const char kCryptohomeFlushAndSignBootAttributes[] =
+ "FlushAndSignBootAttributes";
+const char kCryptohomeGetLoginStatus[] = "GetLoginStatus";
+const char kCryptohomeGetTpmStatus[] = "GetTpmStatus";
+const char kCryptohomeGetEndorsementInfo[] = "GetEndorsementInfo";
+
+// Signals
+const char kSignalAsyncCallStatus[] = "AsyncCallStatus";
+const char kSignalAsyncCallStatusWithData[] = "AsyncCallStatusWithData";
+const char kSignalTpmInitStatus[] = "TpmInitStatus";
+const char kSignalCleanupUsersRemoved[] = "CleanupUsersRemoved";
+// Error code
+enum MountError {
+ MOUNT_ERROR_NONE = 0,
+ MOUNT_ERROR_FATAL = 1 << 0,
+ MOUNT_ERROR_KEY_FAILURE = 1 << 1,
+ MOUNT_ERROR_MOUNT_POINT_BUSY = 1 << 2,
+ MOUNT_ERROR_TPM_COMM_ERROR = 1 << 3,
+ MOUNT_ERROR_TPM_DEFEND_LOCK = 1 << 4,
+ MOUNT_ERROR_USER_DOES_NOT_EXIST = 1 << 5,
+ MOUNT_ERROR_TPM_NEEDS_REBOOT = 1 << 6,
+ MOUNT_ERROR_RECREATED = 1 << 31,
+};
+} // namespace cryptohome
+
+#endif // SYSTEM_API_DBUS_CRYPTOHOME_DBUS_CONSTANTS_H_