Importing an SSL cert under the iPhone SDK

前端 未结 4 876
抹茶落季
抹茶落季 2020-12-24 03:50

My app connects to the Schwab OFX server using NSURLConnection. Unfortunately the server uses a very recent intermediate certificate that is trusted on the Mac

4条回答
  •  甜味超标
    2020-12-24 04:37

    You can bypass ssl settings using CoreFoundation's CFStream object. You'll need to do something like create a stream that connects to the appropriate port on the OFX server, then use CF(Read|Write)StreamSetProperty to provide a CFDictionary (which you can cast an NSDictionary to) with keys like kCFStreamSSLLevel, kCFStreamSSLAllowsAnyRoot, kCFStreamSSLValidatesCertificateChain, etc.

提交回复
热议问题