diff --git a/Sparkle/SUSignatures.h b/Sparkle/SUSignatures.h index 2df04c29..5b3e40ca 100644 --- a/Sparkle/SUSignatures.h +++ b/Sparkle/SUSignatures.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SUSignatures : NSObject { unsigned char ed25519_signature[64]; } -@property (readonly, nullable) NSData *dsaSignature; +@property (strong, readonly, nullable) NSData *dsaSignature; @property (readonly, nullable, nonatomic) const unsigned char *ed25519Signature; - (instancetype)initWithDsa:(NSString * _Nullable)dsa ed:(NSString * _Nullable)ed; @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SUPublicKeys : NSObject { unsigned char ed25519_public_key[32]; } -@property (nullable) NSString *dsaPubKey; +@property (strong, readonly, nullable) NSString *dsaPubKey; @property (readonly, nullable, nonatomic) const unsigned char *ed25519PubKey; - (instancetype)initWithDsa:(NSString * _Nullable)dsa ed:(NSString * _Nullable)ed; diff --git a/Sparkle/SUSignatures.m b/Sparkle/SUSignatures.m index 75ecdc49..4732f516 100644 --- a/Sparkle/SUSignatures.m +++ b/Sparkle/SUSignatures.m @@ -50,13 +50,13 @@ static NSData *decode(NSString *str) { @end @implementation SUPublicKeys -@synthesize dsaPubKey; +@synthesize dsaPubKey = _dsaPubKey; - (instancetype)initWithDsa:(NSString * _Nullable)maybeDsa ed:(NSString * _Nullable)maybeEd25519 { self = [super init]; if (self) { - self.dsaPubKey = maybeDsa; + _dsaPubKey = maybeDsa; if (maybeEd25519 != nil) { NSData *ed = decode(maybeEd25519); assert(32 == sizeof(self->ed25519_public_key)); diff --git a/Sparkle/SUUpdateValidator.m b/Sparkle/SUUpdateValidator.m index 6a987678..0d16deb4 100644 --- a/Sparkle/SUUpdateValidator.m +++ b/Sparkle/SUUpdateValidator.m @@ -21,7 +21,7 @@ @property (nonatomic, readonly) SUHost *host; @property (nonatomic) BOOL prevalidatedSignature; @property (nonatomic) BOOL downloadPrevalidationFailed; -@property (nonatomic, readonly) SUSignatures *signatures; +@property (strong, nonatomic, readonly) SUSignatures *signatures; @property (nonatomic, readonly) NSString *downloadPath; @end @@ -39,7 +39,7 @@ self = [super init]; if (self != nil) { _downloadPath = [downloadPath copy]; - _signatures = [signatures copy]; + _signatures = signatures; _host = host; } return self;