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.
This commit is contained in:
Zorg committed 2015-05-03 20:06:41 -04:00
1 parent f19038e5fe
commit 65bfa1ccf2
1 file changed
+1 -4
+1 -4
View File
@@ -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];
}
}