]> git.saurik.com Git - apple/security.git/blame - OSX/sec/SOSCircle/CKBridge/SOSCloudKeychainConstants.c
Security-57740.51.3.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / CKBridge / SOSCloudKeychainConstants.c
CommitLineData
427c49bc 1/*
d8f41ccd 2 * Copyright (c) 2012-2014 Apple Inc. All Rights Reserved.
427c49bc
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24/*
25 This XPC service is essentially just a proxy to iCloud KVS, which exists since
26 the main security code cannot link against Foundation.
27
28 See sendTSARequestWithXPC in tsaSupport.c for how to call the service
29
30 The client of an XPC service does not get connection events, nor does it
31 need to deal with transactions.
32*/
33
34//------------------------------------------------------------------------------------------------
35
36
37#include <CoreFoundation/CoreFoundation.h>
38#include "SOSCloudKeychainConstants.h"
39
40const uint64_t kCKDXPCVersion = 1;
41
42// seems like launchd looks for the BundleIdentifier, not the name
43const char *xpcServiceName = "com.apple.security.cloudkeychainproxy3"; //"CloudKeychainProxy";
6b200bc3 44const char *xpcIDSServiceName = "com.apple.security.keychainsyncingoveridsproxy";
427c49bc
A
45
46const char *kMessageKeyOperation = "operation";
47const char *kMessageKeyKey = "key";
48const char *kMessageKeyValue = "value";
49const char *kMessageKeyError = "error";
50const char *kMessageKeyVersion = "version";
51const char *kMessageKeyGetNewKeysOnly = "GetNewKeysOnly";
52const char *kMessageKeyKeysToGet = "KeysToGet";
53const char *kMessageKeyKeysRequireFirstUnlock = "KeysRequireFirstUnlock";
54const char *kMessageKeyKeysRequiresUnlocked = "KeysRequiresUnlocked";
427c49bc 55const char *kMessageKeyNotificationFlags = "NotificationFlags";
6b200bc3
A
56const char *kMessageKeyPeerIDList = "peerIDList";
57const char *kMesssgeKeyBackupPeerIDList = "backupPeerIDList";
58const char *kOperationSendDeviceList = "IDSDeviceList";
427c49bc 59
d8f41ccd
A
60/* parameters within the dictionary */
61const char *kMessageAlwaysKeys = "AlwaysKeys";
62const char *kMessageFirstUnlocked = "FirstUnlockKeys";
63const char *kMessageUnlocked = "UnlockedKeys";
64
65const char *kMessageContext = "Context";
66const char *kMessageAllKeys = "AllKeys";
67const char *kMessageKeyParameter = "KeyParameter";
68const char *kMessageCircle = "Circle";
69const char *kMessageMessage = "Message";
5c19dc3a
A
70const char *kMessageKeyDeviceName = "deviceName";
71const char *kMessageKeyIDSDataMessage = "idsDataMessage";
72const char *kMessageKeyDeviceID = "deviceID";
73const char *kMessageKeyPeerID = "peerID";
fa7225c8 74const char *kMessageKeySendersPeerID = "sendersPeerID";
6b200bc3 75const char *kMessageKeyAccountUUID = "AcctUUID";
d8f41ccd 76
427c49bc
A
77const char *kMessageOperationItemChanged = "ItemChanged";
78
79const char *kOperationClearStore = "ClearStore";
80const char *kOperationSynchronize = "Synchronize";
81const char *kOperationSynchronizeAndWait = "SynchronizeAndWait";
82
d8f41ccd
A
83const char *kOperationFlush = "Flush";
84
427c49bc
A
85const char *kOperationPUTDictionary = "PUTDictionary";
86const char *kOperationGETv2 = "GETv2";
427c49bc 87
d8f41ccd 88const char *kOperationRegisterKeys = "RegisterKeys";
5c19dc3a
A
89const char *kOperationGetDeviceID = "DeviceID";
90
6b200bc3
A
91const char *kOperationHasPendingKey = "hasPendingKey";
92
5c19dc3a 93const char *kOperationSendIDSMessage = "IDSMessage";
fa7225c8 94const char *kOperationSendFragmentedIDSMessage = "IDSMessageFragmented";
6b200bc3 95const char *kOperationGetPendingMesages = "IDSPendingMessages";
427c49bc 96
6b200bc3
A
97const char *kOperationRequestSyncWithPeers = "requestSyncWithPeers";
98const char *kOperationHasPendingSyncWithPeer = "hasPendingSyncWithPeer";
d8f41ccd 99const char *kOperationRequestEnsurePeerRegistration = "requestEnsurePeerRegistration";
427c49bc 100
427c49bc
A
101
102/*
103 The values for the KVS notification and KVS Store ID must be identical to the values
104 in syncdefaultsd (SYDApplication.m). The notification string is used in two places:
105 it is in our launchd plist (com.apple.security.cloudkeychainproxy.plist) as the
106 LaunchEvents/com.apple.notifyd.matching key and is examined in code in the stream event handler.
107
108 The KVS Store ID (_SYDRemotePreferencesStoreIdentifierKey in SYDApplication.m) must
109 be in the entitlements. The bundle identifier is (com.apple.security.cloudkeychainproxy3)
110 is used by installInfoForBundleIdentifiers in SYDApplication.m and is used to look up our
111 daemon to figure out what store to use, etc.
112*/
113
114const char * const kCloudKeychainStorechangeChangeNotification = "com.apple.security.cloudkeychainproxy.kvstorechange3"; // was "com.apple.security.cloudkeychain.kvstorechange" for seeds
115
116const char *kNotifyTokenForceUpdate = "com.apple.security.cloudkeychain.forceupdate";