5 // Created by James Murphy on 12/11/12.
6 // Copyright (c) 2012 James Murphy. All rights reserved.
10 #import "PSUtilities.h"
12 @implementation PSCert
14 @synthesize cert_hash = _cert_hash;
17 - (id)initWithCertFilePath:(NSString *)filePath
19 if ((self = [super init]))
23 CFDataRef temp_cf_data = [PSUtilities readFile:filePath];
24 if (NULL == temp_cf_data)
26 NSLog(@"PSCert: Unable to read data for file %@", filePath);
29 _cert_hash = [PSUtilities digestAndEncode:temp_cf_data useSHA1:NO];
30 CFRelease(temp_cf_data);