From 68856e074b04e083468c0f2b187d74521c306e32 Mon Sep 17 00:00:00 2001 From: Kornel Date: Sat, 15 Sep 2018 15:57:44 +0100 Subject: [PATCH] Ed25519 public key in Info.plist --- Sparkle/SUConstants.h | 1 + Sparkle/SUConstants.m | 1 + Sparkle/SUHost.m | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Sparkle/SUConstants.h b/Sparkle/SUConstants.h index af5b04d5..f84995c0 100644 --- a/Sparkle/SUConstants.h +++ b/Sparkle/SUConstants.h @@ -42,6 +42,7 @@ extern NSString *const SUScheduledCheckIntervalKey; extern NSString *const SULastCheckTimeKey; extern NSString *const SUExpectsDSASignatureKey; extern NSString *const SUExpectsEDSignatureKey; +extern NSString *const SUPublicEDKeyKey; extern NSString *const SUPublicDSAKeyKey; extern NSString *const SUPublicDSAKeyFileKey; extern NSString *const SUAutomaticallyUpdateKey; diff --git a/Sparkle/SUConstants.m b/Sparkle/SUConstants.m index 889b7c66..309d9d89 100644 --- a/Sparkle/SUConstants.m +++ b/Sparkle/SUConstants.m @@ -34,6 +34,7 @@ NSString *const SUScheduledCheckIntervalKey = @"SUScheduledCheckInterval"; NSString *const SULastCheckTimeKey = @"SULastCheckTime"; NSString *const SUExpectsDSASignatureKey = @"SUExpectsDSASignature"; NSString *const SUExpectsEDSignatureKey = @"SUExpectsEDSignatureKey"; +NSString *const SUPublicEDKeyKey = @"SUPublicEDKey"; NSString *const SUPublicDSAKeyKey = @"SUPublicDSAKey"; NSString *const SUPublicDSAKeyFileKey = @"SUPublicDSAKeyFile"; NSString *const SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate"; diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index cc08d7e3..015dfe69 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -110,6 +110,11 @@ return (statfs_info.f_flags & MNT_RDONLY) != 0; } +- (NSString *__nullable)publicEDKey +{ + return [self objectForInfoDictionaryKey:SUPublicEDKeyKey]; +} + - (NSString *__nullable)publicDSAKey { // Maybe the key is just a string in the Info.plist. @@ -138,7 +143,7 @@ - (SUPublicKeys *)publicKeys { - return [[SUPublicKeys alloc] initWithDsa:[self publicDSAKey] ed:nil]; + return [[SUPublicKeys alloc] initWithDsa:[self publicDSAKey] ed:[self publicEDKey]]; } - (NSString * __nullable)publicDSAKeyFileKey