Don't allow an app to use an invalid EdDSA public key

This commit is contained in:
Zorg authored and Kornel committed 2021-07-26 15:58:20 +01:00
1 parent 89ab067477
commit c3cdbf46cb
1 file changed
+8
+8
View File
@@ -258,6 +258,14 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
return NO;
}
}
// Don't allow invalid EdDSA public keys
if (publicKeys.ed25519PubKeyStatus == SUSigningInputStatusInvalid) {
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUNoPublicDSAFoundError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"The EdDSA public key is not valid for %@.", hostName] }];
}
return NO;
}
if (!hasAnyPublicKey) {
if ((feedURL != nil && !servingOverHttps) || ![SUCodeSigningVerifier bundleAtURLIsCodeSigned:[[self hostBundle] bundleURL]]) {