]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_codesigning/CodeSigningHelper/main.c
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_codesigning / CodeSigningHelper / main.c
index 553a8c4d09e23937a2a42e7d9cb8633519edfda6..7a493755f76c4abfac1d26acf50b6f6c7a2f709a 100644 (file)
@@ -32,7 +32,7 @@
 #include <sys/param.h>
 #include <xpc/xpc.h>
 #include <syslog.h>
-#include <assert.h>
+#include <security_utilities/simulatecrash_assert.h>
 #include <libproc.h>
 #include <sandbox.h>
 #include <syslog.h>
@@ -94,6 +94,9 @@ fetchData(xpc_connection_t peer, xpc_object_t event)
         pid = (pid_t)xpc_dictionary_get_int64(event, "pid");
         if (pid <= 0)
                 return;
+       
+               size_t iphLength;
+               const void* iphash = xpc_dictionary_get_data(event, "infohash", &iphLength);
 
         xpc_object_t reply = xpc_dictionary_create_reply(event);
         if (reply == NULL)
@@ -130,6 +133,8 @@ fetchData(xpc_connection_t peer, xpc_object_t event)
                 xpc_dictionary_set_string(reply, "error", "can't get content of Info.plist");
                 goto send;
         }
+       
+               ... check the "right" hash against iphash/iphLength
 
         xpc_dictionary_set_data(reply, "infoPlist", CFDataGetBytePtr(data), CFDataGetLength(data));
         CFRelease(data);