iPhone: HTTPS client cert authentication

前端 未结 3 1198
北海茫月
北海茫月 2020-12-22 23:48

I\'m fighting with a client certificate authentication. When a server needs a credential (a certificate in this case), this method is invoked from NSURLConnection d

3条回答
  •  春和景丽
    2020-12-23 00:34

    I use these steps:

    1. extract SecIdentityRef from the pkcs12 certificate file using SecPKCS12Import function
    2. use SecIdentityCopyCertificate function to get SecCertificateRef

    and the rest (a credential initialization) is the same as in my question... I can put here more code if you want. Note that there is a bug (http://openradar.appspot.com/7090030) in the iphone simulator, so it is not possible to work with a lot of certifcates in the simulator.

提交回复
热议问题