]> git.saurik.com Git - apple/security.git/blob - keychain/ot/OTSOSAdapter.h
Security-59306.41.2.tar.gz
[apple/security.git] / keychain / ot / OTSOSAdapter.h
1 #if OCTAGON
2
3 #import "keychain/ckks/CKKSPeer.h"
4 #import "keychain/ckks/CKKSPeerProvider.h"
5 #import "keychain/ot/OTDefines.h"
6 #import "keychain/SecureObjectSync/SOSCloudCircle.h"
7
8 NS_ASSUME_NONNULL_BEGIN
9
10 @protocol OTSOSAdapter <CKKSPeerProvider>
11 @property bool sosEnabled;
12 - (SOSCCStatus)circleStatus:(NSError**)error;
13 - (id<CKKSSelfPeer> _Nullable)currentSOSSelf:(NSError**)error;
14 - (NSSet<id<CKKSRemotePeerProtocol>>* _Nullable)fetchTrustedPeers:(NSError**)error;
15 - (void)updateOctagonKeySetWithAccount:(id<CKKSSelfPeer>)currentSelfPeer error:(NSError**)error;
16 @end
17
18 @interface OTSOSActualAdapter : NSObject <OTSOSAdapter>
19 - (instancetype)init NS_UNAVAILABLE;
20 - (instancetype)initAsEssential:(BOOL)essential;
21
22 // Helper methods
23 + (NSArray<NSData*>*)peerPublicSigningKeySPKIs:(NSSet<id<CKKSPeer>>* _Nullable)peers;
24
25 + (NSSet<NSString*>*)sosCKKSViewList;
26 @end
27
28 // This adapter is for a platform which does not have SOS (e.g., aTV, Watch, HomePod)
29 @interface OTSOSMissingAdapter : NSObject <OTSOSAdapter>
30 @end
31
32 NS_ASSUME_NONNULL_END
33
34 #endif // OCTAGON