質問

閉じたAPIを使用してトラストされていないSSL証明書にアクセスするNSURLConnectionのこれらすべての作業アラウンドを見つけます。他のオプションは、Safari/Mailアプリを使用して、最初に証明書をインストールすることです。

どのルート証明書がインストールされているかを知りたいので、信頼できるCAからそれを手に入れることができます。

誰かが私が何を必要としているのか考えを持っていますか?

役に立ちましたか?

解決

これがiPhoneにインストールされている利用可能なCAのリストです

http://support.apple.com/kb/ht2185

これらの当局のいずれかが証明書に署名することも、独自の証明書に署名してOpenSSLを使用して独自のCAを作成することもできます

他のヒント

実際、パブリックAPIを使用して自己署名SSL証明書を受け入れることができます。

- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
    return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust];
}

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
    if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
        [challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge];
    }

    [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge];
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top