1

秘密鍵と証明書を含む2つのPEMファイルと、サーバーのCAC証明書を使用して、サーバーへのHTTPSPOSTを作成したいと思います。私はしばらくの間Windowsアプリケーションからこれを行ってきましたが、それは正しく機能します。今、私はiPad上のiOSアプリケーションから同じことをしなければなりません。Cocoa Frameworkには、このタイプのリクエストに対する機能がないようです...これを行う方法やiOSデバイスにcURLを導入する方法についてのアイデアをいただければ幸いです。

更新:iOS5.1用にコンパイルされたcURLをopenSSLで使用することになりました。完璧に動作します。

4

1 に答える 1

3

多分ASIHTTPRequest

クライアント証明書の方法

 If your server requires the use of client certificates, as of v1.8 it
 is now possible to send them with your request.

    // Will send the certificate attached to the identity (identity is a SecIdentityRef)
    [request setClientCertificateIdentity:identity];

    // Add an additional certificate (where cert is a SecCertificateRef)
    [request setClientCertificates:[NSArray arrayWithObject:(id)cert]];

 There is a helper function in ClientCertificateTests.m in the iPhone /
 iPad sample app that can create a SecIdentityRef from PKCS12 data
 (this function only works on iOS).
于 2012-05-30T14:28:41.353 に答える