Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I do not have the direct answer to your question, but perhaps few guidelines:</p> <ol> <li><p>Why do you need to use the CFStream API and not the more intuitive <strong><em>NSURLConnection</em></strong> ?<br> From what I could find in the documentation, it seams like not everything that is available for Mac OS X, regarding CFStream API, is available for iOS. So think about it, and see if you can switch to NSURLConnection :-)</p></li> <li><p>For NSURLConnection, you can use the <strong><em>NSURLConnectionDelegate</em></strong> methods to get the SSL challenge and validate the certificate on your own. You can check the <strong><em>wsdl2objc</em></strong> project, where I have implemented these features: </p> <ul> <li>The project: <a href="http://code.google.com/p/wsdl2objc/" rel="nofollow">http://code.google.com/p/wsdl2objc/</a></li> <li>Some guidelines on how to get the certificate references: <a href="http://code.google.com/p/wsdl2objc/wiki/AdvancedOptions" rel="nofollow">http://code.google.com/p/wsdl2objc/wiki/AdvancedOptions</a></li> </ul></li> <li><p>Now about your questions :-)<br> I don't see how you can set a custom (untrusted) CA in <strong><em>kCFStreamPropertySSLSettings</em></strong>. I'm not sure if it can be done by using <strong><em>kCFStreamSSLCertificates</em></strong> since it is meant to be used for setting client-side certificates (thus the requirement of having the <strong><em>SecIdentityRef</em></strong> on index 0, which basically provides the private key).</p></li> <li><p>When you say you don't want to add the certificate to the keychain, do you mean manually or programmatically ? I guess you don't like the users of your app to have to do it manually, but you can use the <strong><em>Security API</em></strong> to import the certificate programatically. In this case your certificate will be imported in a sandboxed keychain which is only available for your application. (again, not sure if this will work but worths the try)</p></li> </ol> <p>In my applications I use NSURLConnectionDelegate to manually validate untrusted certificates.</p> <p>Regards,<br> Pece</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload