6 #include "keychain/SecureObjectSync/SOSCircle.h"
7 #include "keychain/SecureObjectSync/SOSTransportMessageKVS.h"
8 #include "keychain/SecureObjectSync/SOSAccountPriv.h"
10 // MARK: Key formation
27 extern const CFStringRef kSOSKVSKeyParametersKey
;
28 extern const CFStringRef kSOSKVSInitialSyncKey
;
29 extern const CFStringRef kSOSKVSAccountChangedKey
;
30 extern const CFStringRef kSOSKVSRequiredKey
;
31 extern const CFStringRef kSOSKVSOfficialDSIDKey
;
32 extern const CFStringRef kSOSKVSLastCleanupTimestampKey
;
33 extern const CFStringRef kSOSKVSOTRConfigVersion
;
34 extern const CFStringRef kSOSKVSWroteLastKeyParams
;
36 extern const CFStringRef sCirclePrefix
;
37 extern const CFStringRef sRetirementPrefix
;
38 extern const CFStringRef sDebugInfoPrefix
;
40 SOSKVSKeyType
SOSKVSKeyGetKeyType(CFStringRef key
);
41 bool SOSKVSKeyParse(SOSKVSKeyType keyType
, CFStringRef key
, CFStringRef
*circle
, CFStringRef
*peerInfo
, CFStringRef
*ring
, CFStringRef
*backupName
, CFStringRef
*from
, CFStringRef
*to
);
42 SOSKVSKeyType
SOSKVSKeyGetKeyTypeAndParse(CFStringRef key
, CFStringRef
*circle
, CFStringRef
*peerInfo
, CFStringRef
*ring
, CFStringRef
*backupName
, CFStringRef
*from
, CFStringRef
*to
);
44 CFStringRef
SOSCircleKeyCreateWithCircle(SOSCircleRef circle
, CFErrorRef
*error
);
45 CFStringRef
SOSRingKeyCreateWithName(CFStringRef ring_name
, CFErrorRef
*error
);
48 CFStringRef
SOSCircleKeyCreateWithName(CFStringRef name
, CFErrorRef
*error
);
49 CFStringRef
SOSCircleKeyCopyCircleName(CFStringRef key
, CFErrorRef
*error
);
50 CFStringRef
SOSMessageKeyCreateWithCircleNameAndPeerNames(CFStringRef circleName
, CFStringRef from_peer_name
, CFStringRef to_peer_name
);
52 CFStringRef
SOSMessageKeyCopyCircleName(CFStringRef key
, CFErrorRef
*error
);
53 CFStringRef
SOSMessageKeyCopyFromPeerName(CFStringRef messageKey
, CFErrorRef
*error
);
54 CFStringRef
SOSMessageKeyCreateWithCircleAndPeerNames(SOSCircleRef circle
, CFStringRef from_peer_name
, CFStringRef to_peer_name
);
55 CFStringRef
SOSMessageKeyCreateWithCircleAndPeerInfos(SOSCircleRef circle
, SOSPeerInfoRef from_peer
, SOSPeerInfoRef to_peer
);
57 CFStringRef
SOSRetirementKeyCreateWithCircleNameAndPeer(CFStringRef circle_name
, CFStringRef retirement_peer_name
);
58 CFStringRef
SOSRetirementKeyCreateWithCircleAndPeer(SOSCircleRef circle
, CFStringRef retirement_peer_name
);
60 CFStringRef
SOSMessageKeyCreateFromTransportToPeer(SOSMessage
* transport
, CFStringRef myID
, CFStringRef peer_name
);
61 CFStringRef
SOSMessageKeyCreateFromPeerToTransport(SOSMessage
* transport
, CFStringRef myID
, CFStringRef peer_name
);
62 CFStringRef
SOSLastKeyParametersPushedKeyCreateWithAccountGestalt(SOSAccount
* account
);
64 CFStringRef
SOSRingKeyCreateWithRingName(CFStringRef ring_name
);
65 CFStringRef
SOSLastKeyParametersPushedKeyCreateWithPeerID(CFStringRef peerID
);
66 CFStringRef
SOSDebugInfoKeyCreateWithTypeName(CFStringRef type_name
);