]> git.saurik.com Git - apple/security.git/blobdiff - keychain/SecureObjectSync/SOSViews.m
Security-59754.80.3.tar.gz
[apple/security.git] / keychain / SecureObjectSync / SOSViews.m
index 4098335d39d8006742c334427f93a58f2dc45a6a..0b7856876ce273d4d655155cb7612fd3f20c871d 100644 (file)
@@ -306,6 +306,26 @@ CFSetRef SOSViewCreateSetFromBitmask(uint64_t bitmask) {
     return retval;
 }
 
+bool SOSPeerInfoSupportsCKKSForAll(SOSPeerInfoRef peerInfo) {
+    if(!peerInfo) {
+        return false;
+    }
+
+    bool ret = false;
+    CFBooleanRef value = SOSPeerInfoV2DictionaryCopyBoolean(peerInfo, sCKKSForAll);
+
+    if(value) {
+        ret = CFBooleanGetValue(value) ? true : false;
+    }
+
+    CFReleaseNull(value);
+    return ret;
+}
+
+void SOSPeerInfoSetSupportsCKKSForAll(SOSPeerInfoRef peerInfo, bool supports) {
+    return SOSPeerInfoV2DictionarySetValue(peerInfo, sCKKSForAll, supports ? kCFBooleanTrue : kCFBooleanFalse);
+}
+
 const char *SOSViewsXlateAction(SOSViewActionCode action) {
     switch(action) {
         case kSOSCCViewEnable: return "kSOSCCViewEnable";