mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Don't treat a download prevalidation failure as a regular validation failure
You have to remember to invoke prevalidation anyway, so it doesn't gain much for post-validation to check whether prevalidation failed. Also, remove a no-longer correct comment from the corresponding header.
This commit is contained in:
1 parent
8455216a58
commit
50f754c21d
2 files changed
-8
No files matched your search
Vendored
-1
@@ -13,7 +13,6 @@
|
||||
|
||||
@interface SUUpdateValidator : NSObject
|
||||
|
||||
// Pass YES to performingPrevalidation if archive validation must be done immediately, before extraction
|
||||
- (instancetype)initWithDownloadPath:(NSString *)downloadPath signatures:(SUSignatures *)signatures host:(SUHost *)host;
|
||||
|
||||
// This is "pre" validation, before the archive has been extracted
|
||||
|
||||
Vendored
-7
@@ -20,7 +20,6 @@
|
||||
|
||||
@property (nonatomic, readonly) SUHost *host;
|
||||
@property (nonatomic) BOOL prevalidatedSignature;
|
||||
@property (nonatomic) BOOL downloadPrevalidationFailed;
|
||||
@property (strong, nonatomic, readonly) SUSignatures *signatures;
|
||||
@property (nonatomic, readonly) NSString *downloadPath;
|
||||
|
||||
@@ -31,7 +30,6 @@
|
||||
@synthesize host = _host;
|
||||
@synthesize prevalidatedSignature = _prevalidatedSignature;
|
||||
@synthesize signatures = _signatures;
|
||||
@synthesize downloadPrevalidationFailed = _downloadPrevalidationFailed;
|
||||
@synthesize downloadPath = _downloadPath;
|
||||
|
||||
- (instancetype)initWithDownloadPath:(NSString *)downloadPath signatures:(SUSignatures *)signatures host:(SUHost *)host
|
||||
@@ -58,16 +56,11 @@
|
||||
}
|
||||
SULog(SULogLevelError, @"(Ed)DSA signature validation before unarchiving failed for update %@", self.downloadPath);
|
||||
}
|
||||
self.downloadPrevalidationFailed = YES;
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)validateWithUpdateDirectory:(NSString *)updateDirectory
|
||||
{
|
||||
if (self.downloadPrevalidationFailed) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
SUSignatures *signatures = self.signatures;
|
||||
SUPublicKeys *publicKeys = self.host.publicKeys;
|
||||
NSString *downloadPath = self.downloadPath;
|
||||
|
||||
Reference in new issue
Block a user