]> git.saurik.com Git - apple/security.git/blobdiff - keychain/SecureObjectSync/SOSPeerInfoPriv.h
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / SecureObjectSync / SOSPeerInfoPriv.h
diff --git a/keychain/SecureObjectSync/SOSPeerInfoPriv.h b/keychain/SecureObjectSync/SOSPeerInfoPriv.h
new file mode 100644 (file)
index 0000000..c216d2c
--- /dev/null
@@ -0,0 +1,40 @@
+//
+//  SOSPeerInfoPriv.h
+//  sec
+//
+//  Created by Richard Murphy on 12/4/14.
+//
+//
+
+#ifndef sec_SOSPeerInfoPriv_h
+#define sec_SOSPeerInfoPriv_h
+
+#include <CoreFoundation/CFRuntime.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <utilities/SecCFWrappers.h>
+
+struct __OpaqueSOSPeerInfo {
+    CFRuntimeBase           _base;
+    //
+    CFMutableDictionaryRef  description;
+    CFDataRef               signature;
+    
+    // Cached data
+    CFDictionaryRef         gestalt;
+    CFStringRef             peerID;
+    CFIndex                 version;
+    CFStringRef             verifiedAppKeyID;
+    bool                    verifiedResult;
+
+    /* V2 and beyond are listed below */
+    CFMutableDictionaryRef  v2Dictionary;
+};
+
+CF_RETURNS_RETAINED SOSPeerInfoRef SOSPeerInfoAllocate(CFAllocatorRef allocator);
+bool SOSPeerInfoSign(SecKeyRef privKey, SOSPeerInfoRef peer, CFErrorRef *error);
+bool SOSPeerInfoVerify(SOSPeerInfoRef peer, CFErrorRef *error);
+void SOSPeerInfoSetVersionNumber(SOSPeerInfoRef pi, int version);
+
+extern const CFStringRef peerIDLengthKey;
+
+#endif