Allow EdDSA for delta updates, too

This commit is contained in:
Kornel committed 2018-12-16 03:03:23 +00:00
1 parent 4b0a037685
commit b19120f5cd
2 files changed
+4 -5

No files matched your search

+1
View File
@@ -92,6 +92,7 @@
}
if (!signatures) {
SULog(SULogLevelDefault, @"No signatures given to verifyFileAtPath");
return NO;
}
+3 -5
View File
@@ -49,16 +49,14 @@
SUPublicKeys *publicKeys = self.host.publicKeys;
SUSignatures *signatures = self.signatures;
if (publicKeys.dsaPubKey == nil) {
SULog(SULogLevelError, @"Failed to validate update before unarchiving because no DSA public key was found in the old app");
} else if (signatures == nil || signatures.dsaSignature == nil) {
SULog(SULogLevelError, @"Failed to validate update before unarchiving because no DSA signature was found");
if (publicKeys.dsaPubKey == nil && publicKeys.ed25519PubKey == nil) {
SULog(SULogLevelError, @"Failed to validate update before unarchiving because no (Ed)DSA public key was found in the old app");
} else {
if ([SUSignatureVerifier validatePath:self.downloadPath withSignatures:signatures withPublicKeys:publicKeys]) {
self.prevalidatedSignature = YES;
return YES;
}
SULog(SULogLevelError, @"DSA signature validation before unarchiving failed for update %@", self.downloadPath);
SULog(SULogLevelError, @"(Ed)DSA signature validation before unarchiving failed for update %@", self.downloadPath);
}
self.downloadPrevalidationFailed = YES;
return NO;