title: How to add security identity (certificate + private key) to iPhone keychain?
body: <p>How to add security identity (certificate + private key) to iPhone keychain?
  I have .p12 file in application. I can get identity from it using SecPKCS12Import() but
  when i try to do the following:</p>
  
  <pre><code>NSMutableDictionary *secIdentityParams = [[NSMutableDictionary alloc] init];    
  [secIdentityParams setObject:(id)kSecClassIdentity forKey:(id)kSecClass];
  [secIdentityParams setObject:label forKey:(id)kSecAttrLabel];
  [secIdentityParams setObject:(id)myIdentity forKey:(id)kSecValueRef];
  
  status = SecItemAdd((CFDictionaryRef) secIdentityParams, NULL);
  </code></pre>
  
  <p>I am getting error = -25291 -> No trust results are available.
  What am I doing wrong?</p>