Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fall back on DSA-only installation checks for .pkg installations

  • Loading branch information...
commit 243fdf8f7f931b16ac3f1e28bbdd1d862d6ed4fd 1 parent 337002f
@andymatuschak andymatuschak authored
Showing with 10 additions and 9 deletions.
  1. +10 −9 SUBasicUpdateDriver.m
View
19 SUBasicUpdateDriver.m
@@ -204,19 +204,20 @@ - (void)download:(NSURLDownload *)d decideDestinationWithSuggestedFilename:(NSSt
[download setDestination:downloadPath allowOverwrite:YES];
}
-- (BOOL)validateUpdateDownloadedToPath:(NSString *)destinationPath extractedToPath:(NSString *)extractedPath DSASignature:(NSString *)DSASignature publicDSAKey:(NSString *)publicDSAKey
+- (BOOL)validateUpdateDownloadedToPath:(NSString *)downloadedPath extractedToPath:(NSString *)extractedPath DSASignature:(NSString *)DSASignature publicDSAKey:(NSString *)publicDSAKey
{
NSString *newBundlePath = [SUInstaller appPathInUpdateFolder:extractedPath forHost:host];
- if (!newBundlePath) return NO;
-
- NSError *error = nil;
- if ([SUCodeSigningVerifier codeSignatureIsValidAtPath:newBundlePath error:&error]) {
- return YES;
- } else {
- SULog(@"Code signature check on update failed: %@", error);
+ if (newBundlePath)
+ {
+ NSError *error = nil;
+ if ([SUCodeSigningVerifier codeSignatureIsValidAtPath:newBundlePath error:&error]) {
+ return YES;
+ } else {
+ SULog(@"Code signature check on update failed: %@", error);
+ }
}
- return [SUDSAVerifier validatePath:destinationPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey];
+ return [SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey];
}
- (void)downloadDidFinish:(NSURLDownload *)d
Please sign in to comment.
Something went wrong with that request. Please try again.