]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/CKBridge/SOSCloudKeychainConstants.c
Security-58286.51.6.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / CKBridge / SOSCloudKeychainConstants.c
1 /*
2 * Copyright (c) 2012-2014 Apple Inc. All Rights Reserved.
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
40 const uint64_t kCKDXPCVersion = 1;
41
42 // seems like launchd looks for the BundleIdentifier, not the name
43 const char *xpcServiceName = "com.apple.security.cloudkeychainproxy3"; //"CloudKeychainProxy";
44 const char *xpcIDSServiceName = "com.apple.security.keychainsyncingoveridsproxy";
45
46 const char *kMessageKeyOperation = "operation";
47 const char *kMessageKeyKey = "key";
48 const char *kMessageKeyValue = "value";
49 const char *kMessageKeyError = "error";
50 const char *kMessageKeyVersion = "version";
51 const char *kMessageKeyGetNewKeysOnly = "GetNewKeysOnly";
52 const char *kMessageKeyKeysToGet = "KeysToGet";
53 const char *kMessageKeyKeysRequireFirstUnlock = "KeysRequireFirstUnlock";
54 const char *kMessageKeyKeysRequiresUnlocked = "KeysRequiresUnlocked";
55 const char *kMessageKeyNotificationFlags = "NotificationFlags";
56 const char *kMessageKeyPeerIDList = "peerIDList";
57 const char *kMesssgeKeyBackupPeerIDList = "backupPeerIDList";
58 const char *kOperationSendDeviceList = "IDSDeviceList";
59
60 /* parameters within the dictionary */
61 const char *kMessageAlwaysKeys = "AlwaysKeys";
62 const char *kMessageFirstUnlocked = "FirstUnlockKeys";
63 const char *kMessageUnlocked = "UnlockedKeys";
64
65 const char *kMessageContext = "Context";
66 const char *kMessageAllKeys = "AllKeys";
67 const char *kMessageKeyParameter = "KeyParameter";
68 const char *kMessageCircle = "Circle";
69 const char *kMessageMessage = "Message";
70 const char *kMessageKeyDeviceName = "deviceName";
71 const char *kMessageKeyIDSDataMessage = "idsDataMessage";
72 const char *kMessageKeyDeviceID = "deviceID";
73 const char *kMessageKeyPeerID = "peerID";
74 const char *kMessageKeySendersPeerID = "sendersPeerID";
75 const char *kMessageKeyAccountUUID = "AcctUUID";
76 const char *kMessageKeySenderDeviceID = "SendersDeviceID";
77
78 const char *kMessageOperationItemChanged = "ItemChanged";
79
80 const char *kOperationClearStore = "ClearStore";
81 const char *kOperationSynchronize = "Synchronize";
82 const char *kOperationSynchronizeAndWait = "SynchronizeAndWait";
83
84 const char *kOperationFlush = "Flush";
85
86 const char *kOperationPerfCounters = "PerfCounters";
87
88 const char *kOperationPUTDictionary = "PUTDictionary";
89 const char *kOperationGETv2 = "GETv2";
90
91 const char *kOperationRegisterKeys = "RegisterKeys";
92 const char *kOperationRemoveKeys = "RemoveKeys";
93
94 const char *kOperationGetDeviceID = "DeviceID";
95 const char *kOperationGetIDSPerfCounters = "IDSPerf";
96
97 const char *kOperationHasPendingKey = "hasPendingKey";
98
99 const char *kOperationSendIDSMessage = "IDSMessage";
100 const char *kOperationSendFragmentedIDSMessage = "IDSMessageFragmented";
101 const char *kOperationGetPendingMesages = "IDSPendingMessages";
102
103 const char *kOperationRequestSyncWithPeers = "requestSyncWithPeers";
104 const char *kOperationHasPendingSyncWithPeer = "hasPendingSyncWithPeer";
105 const char *kOperationRequestEnsurePeerRegistration = "requestEnsurePeerRegistration";
106
107
108 /*
109 The values for the KVS notification and KVS Store ID must be identical to the values
110 in syncdefaultsd (SYDApplication.m). The notification string is used in two places:
111 it is in our launchd plist (com.apple.security.cloudkeychainproxy.plist) as the
112 LaunchEvents/com.apple.notifyd.matching key and is examined in code in the stream event handler.
113
114 The KVS Store ID (_SYDRemotePreferencesStoreIdentifierKey in SYDApplication.m) must
115 be in the entitlements. The bundle identifier is (com.apple.security.cloudkeychainproxy3)
116 is used by installInfoForBundleIdentifiers in SYDApplication.m and is used to look up our
117 daemon to figure out what store to use, etc.
118 */
119
120 const char * const kCloudKeychainStorechangeChangeNotification = "com.apple.security.cloudkeychainproxy.kvstorechange3"; // was "com.apple.security.cloudkeychain.kvstorechange" for seeds
121
122 const char *kNotifyTokenForceUpdate = "com.apple.security.cloudkeychain.forceupdate";