title: get pfx file included in a mobilecertificate in iOS
body: <p>I'm trying to connect to a server using a .pfx that is stored in a .mobileconfig file on my iPhone.</p>
  
  <p>When the server ask for it in</p>
  
  <pre><code>-(void)connection:(NSURLConnection*)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge*)challenge{
  </code></pre>
  
  <p>How can I create the NSURLCredential with the .pfx? Should I use</p>
  
  <pre><code>+ (NSURLCredential *)credentialWithIdentity:(SecIdentityRef)identity certificates:(NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence
  </code></pre>
  
  <p>If thats the case, how do I extract the .pfx to put it into the array.</p>
  
  <p>Thanks in advance.</p>