1.1 --- a/MYPublicKey.m Sun Apr 19 00:01:41 2009 -0700
1.2 +++ b/MYPublicKey.m Tue Jun 02 13:16:28 2009 -0700
1.3 @@ -47,7 +47,7 @@
1.4
1.5 #if !MYCRYPTO_USE_IPHONE_API
1.6 - (SecExternalFormat) _externalFormat {
1.7 - return kSecFormatOpenSSL;
1.8 + return kSecFormatBSAFE;
1.9 }
1.10 #endif
1.11
1.12 @@ -134,11 +134,12 @@
1.13 &ctx),
1.14 @"CSSM_CSP_CreateAsymmetricContext"))
1.15 return nil;
1.16 -
1.17 +
1.18 // Now wrap the key:
1.19 NSData *result = nil;
1.20 CSSM_WRAP_KEY wrappedKey = {};
1.21 - if (checkcssm(CSSM_WrapKey(ctx, credentials, sessionKey.cssmKey, NULL, &wrappedKey),
1.22 + CSSM_DATA descriptiveData = {};
1.23 + if (checkcssm(CSSM_WrapKey(ctx, credentials, sessionKey.cssmKey, &descriptiveData, &wrappedKey),
1.24 @"CSSM_WrapKey")) {
1.25 // ...and copy the wrapped key data to the result NSData:
1.26 result = [NSData dataWithBytes: wrappedKey.KeyData.Data length: wrappedKey.KeyData.Length];