SecPKCS12Import

I install my app on iPhone6 plus by Hoc,with ios 8.2. "SecPKCS12Import" leak, device log"<Error>: SecTrustEvaluate [leaf AnchorTrusted]",

bug run my app on iPhone6 plus by Xcode,SecPKCS12Import is right,


+ (BOOL)extractIdentity:(SecIdentityRef *)outIdentity andTrust:(SecTrustRef*)outTrust fromPKCS12Data:(NSData *)inPKCS12Data addPassword:(NSString *)password

{

NSDictionary *optionsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:password,kSecImportExportPassphrase, nil];


CFArrayRef items = CFArrayCreate(NULL, 0, 0, NULL);


//<Error>: SecTrustEvaluate [leaf AnchorTrusted]

OSStatus securityError = SecPKCS12Import((__bridge CFDataRef)inPKCS12Data, (__bridge CFDictionaryRef)optionsDictionary, &items);


if (securityError == 0)

{

CFDictionaryRef myIdentityAndTrust = CFArrayGetValueAtIndex (items, 0);

const void *tempIdentity = NULL;

tempIdentity = CFDictionaryGetValue (myIdentityAndTrust, kSecImportItemIdentity);

*outIdentity = (SecIdentityRef)tempIdentity;

const void *tempTrust = NULL;

tempTrust = CFDictionaryGetValue (myIdentityAndTrust, kSecImportItemTrust);

*outTrust = (SecTrustRef)tempTrust;

}

else

{

NSLog(@"Failed with error code %d",(int)securityError);

return NO;

}

return YES;

}

I install my app on iPhone6 plus by Hoc?with ios 8.2. "SecPKCS12Import" leak, device log": SecTrustEvaluate [leaf AnchorTrusted]", bug run my app on iPhone6 plus by Xcode?SecPKCS12Import is right,

I'm sorry, I'm completely unable to parse this text.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1@apple.com"
SecPKCS12Import
 
 
Q