From 3ec3d6f2af67a78ec145f437f8ed96c5f6ddc640 Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Fri, 8 Dec 2017 11:42:58 -0600 Subject: [PATCH] Run codesign when signing identity is set to "-" This creates an adhoc signature rather than not signing --- Configurations/set-agent-signing.sh | 2 +- Configurations/set-ats-exceptions-test-app.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Configurations/set-agent-signing.sh b/Configurations/set-agent-signing.sh index f485a16a..f820168f 100755 --- a/Configurations/set-agent-signing.sh +++ b/Configurations/set-agent-signing.sh @@ -3,6 +3,6 @@ AGENT_PATH="${TARGET_BUILD_DIR}"/"${CONTENTS_FOLDER_PATH}"/MacOS/"${SPARKLE_INSTALLER_PROGRESS_TOOL_NAME}".app #Only sign the agent app if we have code signing enabled (as we do with adhoc signatures in Debug builds for testing sandboxing) -if [ ! -z "${CODE_SIGN_IDENTITY}" -a "${CODE_SIGN_IDENTITY}" != "-" ] ; then +if [ ! -z "${CODE_SIGN_IDENTITY}" ] ; then codesign --verbose -f -s "${CODE_SIGN_IDENTITY}" "${AGENT_PATH}" fi diff --git a/Configurations/set-ats-exceptions-test-app.sh b/Configurations/set-ats-exceptions-test-app.sh index eea714a9..53ccfc36 100755 --- a/Configurations/set-ats-exceptions-test-app.sh +++ b/Configurations/set-ats-exceptions-test-app.sh @@ -7,6 +7,6 @@ DOWNLOADER_INFO_PLIST="${TARGET_BUILD_DIR}"/"${CONTENTS_FOLDER_PATH}"/XPCService #Only alter bundles if code signing is off, else we'll invalidate the signature on them #If code signing is enabled (as in debug mode), then we rely on another script for turning ATS exceptions on for these services #In release mode however, those services do not have ATS exceptions set up which is why we have to set up exceptions *here* -if [ -z "${CODE_SIGN_IDENTITY}" -o "${CODE_SIGN_IDENTITY}" == "-" ] ; then +if [ -z "${CODE_SIGN_IDENTITY}" ] ; then /usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads YES" "${DOWNLOADER_INFO_PLIST}" fi