1

サーバーと通信する必要があり、自己署名 TLS 証明書をすべてのファイルに添付する必要がありますNSURLRequest

それを行う方法はありますか?

4

1 に答える 1

1

接続デリゲートは実装connection:canAuthenticateAgainstProtectionSpace:し、YES と答える必要があります。それが完了すると、デリゲートが受け取りますconnection:didReceiveAuthenticationChallenge:

証明書を処理するには、そのメソッドが NSURLCredential に応答する必要があります。を使用して、証明書を使用してそれらのいずれかを作成します

+ (NSURLCredential *)credentialWithIdentity:(SecIdentityRef)identity certificates:(NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence
于 2013-02-27T15:15:15.763 に答える