1.1 --- a/MYPrivateKey.m Sun Jun 07 21:53:56 2009 -0700
1.2 +++ b/MYPrivateKey.m Tue Jul 21 10:13:08 2009 -0700
1.3 @@ -178,8 +178,16 @@
1.4 - (MYSHA1Digest*) _keyDigest {
1.5 if (_publicKey)
1.6 return _publicKey.publicKeyDigest;
1.7 - else
1.8 - return [MYSHA1Digest digestFromDigestData: [self _attribute: kSecAttrApplicationLabel]];
1.9 + else {
1.10 + NSData *digestData;
1.11 +#if MYCRYPTO_USE_IPHONE_API
1.12 + digestData = [self _attribute: kSecAttrApplicationLabel];
1.13 +#else
1.14 + digestData = [[self class] _getAttribute: kSecKeyLabel
1.15 + ofItem: (SecKeychainItemRef)self.keyRef];
1.16 +#endif
1.17 + return [MYSHA1Digest digestFromDigestData: digestData];
1.18 + }
1.19 }
1.20
1.21 - (MYSHA1Digest*) publicKeyDigest {