views:

51

answers:

0

Hi there,

I am trying to port what I have done in .NET to the iphone. Basically I am trying to use an API to communicate with a server. The API requires mutual authentication through a X.509 certificate.

I did manage to make this work with .NET (which was quite easy), however it's note clear with the iPhone.

Did somebody do this before and could show me some code I can start with?

Thanks!

edit1: I am using the Apple documentation to go further. I am now stuck at the point where SecTrustEvaluate(myTrust, &trustResult) would return kSecTrustResultRecoverableTrustFailure. It does not seem possible on the iPhone to get any more detail about the failure.

I created a self-signed certificate from the Keychain Access. Any idea how the certificate needs to be "setup" to pass the SecTrustEvaluate test?