From 45a90990827d5799fe1a01c1d8fc52e71bd1d9f2 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 17 Jul 2022 20:55:31 -0700 Subject: [PATCH] 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. --- Sparkle/SPUUpdater.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sparkle/SPUUpdater.m b/Sparkle/SPUUpdater.m index 9cac02d1..87d66ff7 100644 --- a/Sparkle/SPUUpdater.m +++ b/Sparkle/SPUUpdater.m @@ -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; } }