From 65bfa1ccf27eb82179a209b8bb006f44744b106a Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 3 May 2015 20:06:41 -0400 Subject: [PATCH] Only check if new path is code signed If the original app is signed, and the update is not, this is actually fine if the DSA validation goes through. And this may be desirable for people that don't want to pay cash to code sign their application anymore. --- Sparkle/SUPlainInstaller.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Sparkle/SUPlainInstaller.m b/Sparkle/SUPlainInstaller.m index 1aeb6317..0846f8fd 100644 --- a/Sparkle/SUPlainInstaller.m +++ b/Sparkle/SUPlainInstaller.m @@ -32,14 +32,11 @@ NSError *error = nil; NSString *oldPath = [host bundlePath]; NSString *tempName = [self temporaryNameForPath:[host installationPath]]; - BOOL hostIsCodeSigned = [SUCodeSigningVerifier applicationAtPathIsCodeSigned:oldPath]; BOOL result = [self copyPathWithAuthentication:path overPath:installationPath temporaryName:tempName error:&error]; if (result) { - // If the host is code signed, then the replacement should be be too (and the signature should be valid). - BOOL needToCheckCodeSignature = (hostIsCodeSigned || [SUCodeSigningVerifier applicationAtPathIsCodeSigned:installationPath]); - if (needToCheckCodeSignature) { + if ([SUCodeSigningVerifier applicationAtPathIsCodeSigned:installationPath]) { result = [SUCodeSigningVerifier codeSignatureIsValidAtPath:installationPath error:&error]; } }