5 #import "Security/SecureObjectSync/SOSAccountPriv.h"
6 #import "Security/SecureObjectSync/SOSAccountTrust.h"
8 @implementation SOSAccountTrust
9 @synthesize cachedOctagonEncryptionKey = _cachedOctagonEncryptionKey;
10 @synthesize cachedOctagonSigningKey = _cachedOctagonSigningKey;
14 return [[SOSAccountTrust alloc]init];
22 self.retirees = [NSMutableSet set];
23 self.fullPeerInfo = NULL;
24 self.trustedCircle = NULL;
25 self.departureCode = kSOSDepartureReasonError;
26 self.expansion = [NSMutableDictionary dictionary];
31 -(id)initWithRetirees:(NSMutableSet*)r fpi:(SOSFullPeerInfoRef)fpi circle:(SOSCircleRef) trusted_circle
32 departureCode:(enum DepartureReason)code peerExpansion:(NSMutableDictionary*)e
39 self.fullPeerInfo = fpi;
40 self.trustedCircle = trusted_circle;
41 self.departureCode = code;
48 CFReleaseNull(self->fullPeerInfo);
49 CFReleaseNull(self->peerInfo);
50 CFReleaseNull(self->trustedCircle);
51 CFReleaseNull(self->_cachedOctagonSigningKey);
52 CFReleaseNull(self->_cachedOctagonEncryptionKey);
56 - (SOSPeerInfoRef) peerInfo {
57 return SOSFullPeerInfoGetPeerInfo(self.fullPeerInfo);
60 - (NSString*) peerID {
61 return (__bridge_transfer NSString*) CFRetainSafe(SOSPeerInfoGetPeerID(self.peerInfo));
64 @synthesize trustedCircle = trustedCircle;
66 - (void) setTrustedCircle:(SOSCircleRef) circle {
67 CFRetainAssign(self->trustedCircle, circle);
70 @synthesize retirees = retirees;
72 -(void) setRetirees:(NSSet *)newRetirees
74 self->retirees = newRetirees.mutableCopy;
77 @synthesize fullPeerInfo = fullPeerInfo;
79 - (void) setFullPeerInfo:(SOSFullPeerInfoRef) newIdentity {
80 CFRetainAssign(self->fullPeerInfo, newIdentity);
83 @synthesize expansion = expansion;
85 -(void)setExpansion:(NSDictionary*) newExpansion
87 self->expansion = newExpansion.mutableCopy;
90 @synthesize departureCode = departureCode;
92 -(void)setDepartureCode:(enum DepartureReason)newDepartureCode
94 self->departureCode = newDepartureCode;