+void xpcEngineLegacyCheck(CFDataRef hashData, SecCSDigestAlgorithm hashType, CFStringRef teamID)
+{
+ Message msg("legacy-check");
+ xpc_dictionary_set_data(msg, "hashData", CFDataGetBytePtr(hashData), CFDataGetLength(hashData));
+ xpc_dictionary_set_uint64(msg, "hashType", hashType);
+
+ // There may not be a team id, so just leave it off if there isn't since xpc_dictionary_set_string
+ // will return a NULL if the value isn't provided.
+ if (teamID) {
+ xpc_dictionary_set_string(msg, "teamID", CFStringGetCStringPtr(teamID, kCFStringEncodingUTF8));
+ }
+
+ msg.send();
+
+ if (int64_t error = xpc_dictionary_get_int64(msg, "error")) {
+ MacOSError::throwMe((int)error);
+ }
+}