7 #include <Security/SecureObjectSync/SOSTransportMessageKVS.h>
8 #include <Security/SecureObjectSync/SOSAccountPriv.h>
10 // MARK: Key formation
28 extern const CFStringRef kSOSKVSKeyParametersKey
;
29 extern const CFStringRef kSOSKVSInitialSyncKey
;
30 extern const CFStringRef kSOSKVSAccountChangedKey
;
31 extern const CFStringRef kSOSKVSRequiredKey
;
32 extern const CFStringRef kSOSKVSOfficialDSIDKey
;
33 extern const CFStringRef kSOSKVSLastCleanupTimestampKey
;
34 extern const CFStringRef kSOSKVSOTRConfigVersion
;
35 extern const CFStringRef kSOSKVSWroteLastKeyParams
;
37 extern const CFStringRef sCirclePrefix
;
38 extern const CFStringRef sRetirementPrefix
;
39 extern const CFStringRef sDebugInfoPrefix
;
41 SOSKVSKeyType
SOSKVSKeyGetKeyType(CFStringRef key
);
42 bool SOSKVSKeyParse(SOSKVSKeyType keyType
, CFStringRef key
, CFStringRef
*circle
, CFStringRef
*peerInfo
, CFStringRef
*ring
, CFStringRef
*backupName
, CFStringRef
*from
, CFStringRef
*to
);
43 SOSKVSKeyType
SOSKVSKeyGetKeyTypeAndParse(CFStringRef key
, CFStringRef
*circle
, CFStringRef
*peerInfo
, CFStringRef
*ring
, CFStringRef
*backupName
, CFStringRef
*from
, CFStringRef
*to
);
45 CFStringRef
SOSCircleKeyCreateWithCircle(SOSCircleRef circle
, CFErrorRef
*error
);
46 CFStringRef
SOSRingKeyCreateWithName(CFStringRef ring_name
, CFErrorRef
*error
);
49 CFStringRef
SOSCircleKeyCreateWithName(CFStringRef name
, CFErrorRef
*error
);
50 CFStringRef
SOSCircleKeyCopyCircleName(CFStringRef key
, CFErrorRef
*error
);
51 CFStringRef
SOSMessageKeyCreateWithCircleNameAndPeerNames(CFStringRef circleName
, CFStringRef from_peer_name
, CFStringRef to_peer_name
);
53 CFStringRef
SOSMessageKeyCopyCircleName(CFStringRef key
, CFErrorRef
*error
);
54 CFStringRef
SOSMessageKeyCopyFromPeerName(CFStringRef messageKey
, CFErrorRef
*error
);
55 CFStringRef
SOSMessageKeyCreateWithCircleAndPeerNames(SOSCircleRef circle
, CFStringRef from_peer_name
, CFStringRef to_peer_name
);
56 CFStringRef
SOSMessageKeyCreateWithCircleAndPeerInfos(SOSCircleRef circle
, SOSPeerInfoRef from_peer
, SOSPeerInfoRef to_peer
);
58 CFStringRef
SOSRetirementKeyCreateWithCircleNameAndPeer(CFStringRef circle_name
, CFStringRef retirement_peer_name
);
59 CFStringRef
SOSRetirementKeyCreateWithCircleAndPeer(SOSCircleRef circle
, CFStringRef retirement_peer_name
);
61 CFStringRef
SOSMessageKeyCreateFromTransportToPeer(SOSMessage
* transport
, CFStringRef myID
, CFStringRef peer_name
);
62 CFStringRef
SOSMessageKeyCreateFromPeerToTransport(SOSMessage
* transport
, CFStringRef myID
, CFStringRef peer_name
);
63 CFStringRef
SOSLastKeyParametersPushedKeyCreateWithAccountGestalt(SOSAccount
* account
);
64 CFStringRef
SOSMessageKeyCreateWithCircleNameAndTransportType(CFStringRef circleName
, CFStringRef transportType
);
66 CFStringRef
SOSRingKeyCreateWithRingName(CFStringRef ring_name
);
67 CFStringRef
SOSLastKeyParametersPushedKeyCreateWithPeerID(CFStringRef peerID
);
68 CFStringRef
SOSDebugInfoKeyCreateWithTypeName(CFStringRef type_name
);