Reject DSA only configurations for setting up the updater (#2207)

The one exception is an updater that is targeted to update another / non-main bundle.

Note we still allow configuration of not using DSA or EdDSA with the deprecation warning in tact.
This commit is contained in:
Zorg authored and GitHub committed 2022-07-17 20:55:31 -07:00
1 parent aa72b3f639
commit 45a9099082
1 file changed
+5 -4
+5 -4
View File
@@ -347,10 +347,11 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
}
} else if (publicKeys.ed25519PubKey == nil) {
// No EdDSA key is available, so app must be using DSA
if (updatingMainBundle && !self.loggedNoSecureKeyWarning) {
SULog(SULogLevelError, @"Error: Serving updates without an EdDSA key is insecure and deprecated. DSA support may be removed in a future Sparkle release. Please migrate to using EdDSA (ed25519). Visit Sparkle's documentation for migration information: https://sparkle-project.org/documentation/#3-segue-for-security-concerns");
self.loggedNoSecureKeyWarning = YES;
if (updatingMainBundle) {
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUNoPublicDSAFoundError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"For security reasons, updates need to be signed with an EdDSA key for %@. Please migrate to using EdDSA (ed25519). Visit Sparkle's documentation for migration information: https://sparkle-project.org/documentation/#3-segue-for-security-concerns.", hostName] }];
}
return NO;
}
}