<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ignoring Certificate Errors on NSUrlRequest</title>
	<atom:link href="http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/</link>
	<description>Our DNA is written in Objective-C</description>
	<lastBuildDate>Fri, 10 Feb 2012 06:10:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Drops</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-4109</link>
		<dc:creator>Drops</dc:creator>
		<pubDate>Thu, 05 Jan 2012 09:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-4109</guid>
		<description>synchronous calls don&#039;t use the delegate, so it won&#039;t work. The only way to get HTTPS work with synchronous calls is to have a valid root certificate, either because the server certificate comes from a regular provider or because you have installed your own ROOTCA on the device via Apple&#039;s management tool.</description>
		<content:encoded><![CDATA[<p>synchronous calls don&#8217;t use the delegate, so it won&#8217;t work. The only way to get HTTPS work with synchronous calls is to have a valid root certificate, either because the server certificate comes from a regular provider or because you have installed your own ROOTCA on the device via Apple&#8217;s management tool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh Mallick</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-4107</link>
		<dc:creator>Kamlesh Mallick</dc:creator>
		<pubDate>Thu, 05 Jan 2012 07:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-4107</guid>
		<description>Thanks for the blog.
I have a question.

If i use the &#039;sendSynchronousRequest&#039; api call, and if the certificate is trusted, will this API work?

The reason i ask is we already have an app which uses &#039;sendSynchronousRequest&#039; and a customer is having issues with https.
What kind of certificate should the customer use?  Which company? 
Ultimately what certificate would enable this API - sendSynchronousRequest to work?</description>
		<content:encoded><![CDATA[<p>Thanks for the blog.<br />
I have a question.</p>
<p>If i use the &#8216;sendSynchronousRequest&#8217; api call, and if the certificate is trusted, will this API work?</p>
<p>The reason i ask is we already have an app which uses &#8216;sendSynchronousRequest&#8217; and a customer is having issues with https.<br />
What kind of certificate should the customer use?  Which company?<br />
Ultimately what certificate would enable this API &#8211; sendSynchronousRequest to work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshul</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-3153</link>
		<dc:creator>Anshul</dc:creator>
		<pubDate>Tue, 04 Oct 2011 14:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-3153</guid>
		<description>But the drops method is also working fine. I assume that is much more easier for newbies like me to absorb( Somebody might like to elaborate on this). Anyways thanks a lot for the help.</description>
		<content:encoded><![CDATA[<p>But the drops method is also working fine. I assume that is much more easier for newbies like me to absorb( Somebody might like to elaborate on this). Anyways thanks a lot for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NSURLConnection with Self-Signed Certificates @ Cocoanetics</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-1731</link>
		<dc:creator>NSURLConnection with Self-Signed Certificates @ Cocoanetics</dc:creator>
		<pubDate>Sat, 04 Dec 2010 09:43:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-1731</guid>
		<description>[...] as to how you can prevent NSURLConnection from aborting a HTTPS GET if the certificate is invalid. At that time it seemed like the only method available was a forbidden one: allowsAnyHTTPSCertificateForHost. [...]</description>
		<content:encoded><![CDATA[<p>[...] as to how you can prevent NSURLConnection from aborting a HTTPS GET if the certificate is invalid. At that time it seemed like the only method available was a forbidden one: allowsAnyHTTPSCertificateForHost. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charles</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-1454</link>
		<dc:creator>charles</dc:creator>
		<pubDate>Tue, 24 Aug 2010 02:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-1454</guid>
		<description>since apple do not allow private api calls, ghenriksen&#039;s way works great for me, Thanks!</description>
		<content:encoded><![CDATA[<p>since apple do not allow private api calls, ghenriksen&#8217;s way works great for me, Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ignoring Certificate Errors on NSUrlRequest &#171; The Official Blog of Web X.0 Media</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-1453</link>
		<dc:creator>Ignoring Certificate Errors on NSUrlRequest &#171; The Official Blog of Web X.0 Media</dc:creator>
		<pubDate>Sun, 10 Jan 2010 18:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-1453</guid>
		<description>[...] http://www.drobnik.com/touch/2009/11/ignoring-certificate-errors-on-nsurlrequest/     &#171; Attaching an Image of UIView to&#160;Email [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.drobnik.com/touch/2009/11/ignoring-certificate-errors-on-nsurlrequest/" rel="nofollow">http://www.drobnik.com/touch/2009/11/ignoring-certificate-errors-on-nsurlrequest/</a>     &laquo; Attaching an Image of UIView to&nbsp;Email [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ghenriksen</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-1452</link>
		<dc:creator>ghenriksen</dc:creator>
		<pubDate>Sat, 09 Jan 2010 16:00:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-1452</guid>
		<description>There is a supported API for ignoring bad certificates during NSURLConnection loads. To do so, simply add something like this to your NSURLConnection delegate:

&lt;pre lang=&quot;objC&quot;&gt;- (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])
    if ([trustedHosts containsObject:challenge.protectionSpace.host])
      [challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge];

  [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge];
}
&lt;/pre&gt;
Note that connection:didReceiveAuthenticationChallenge: can send its message to challenge.sender (much) later, say from a delegate method of an SFCertificateTrustPanel.</description>
		<content:encoded><![CDATA[<p>There is a supported API for ignoring bad certificates during NSURLConnection loads. To do so, simply add something like this to your NSURLConnection delegate:</p>

<div class="wp_codebox"><table><tr id="p14881"><td class="code" id="p1488code1"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>connection<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/"><span style="color: #400080;">NSURLConnection</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>connection canAuthenticateAgainstProtectionSpace<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLProtectionSpace_Class/"><span style="color: #400080;">NSURLProtectionSpace</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>protectionSpace <span style="color: #002200;">&#123;</span>
  <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>protectionSpace.authenticationMethod isEqualToString<span style="color: #002200;">:</span>NSURLAuthenticationMethodServerTrust<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>connection<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/"><span style="color: #400080;">NSURLConnection</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>connection didReceiveAuthenticationChallenge<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/"><span style="color: #400080;">NSURLAuthenticationChallenge</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>challenge <span style="color: #002200;">&#123;</span>
  <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>challenge.protectionSpace.authenticationMethod isEqualToString<span style="color: #002200;">:</span>NSURLAuthenticationMethodServerTrust<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>trustedHosts containsObject<span style="color: #002200;">:</span>challenge.protectionSpace.host<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
      <span style="color: #002200;">&#91;</span>challenge.sender useCredential<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLCredential_Class/"><span style="color: #400080;">NSURLCredential</span></a> credentialForTrust<span style="color: #002200;">:</span>challenge.protectionSpace.serverTrust<span style="color: #002200;">&#93;</span> forAuthenticationChallenge<span style="color: #002200;">:</span>challenge<span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #002200;">&#91;</span>challenge.sender continueWithoutCredentialForAuthenticationChallenge<span style="color: #002200;">:</span>challenge<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></td></tr></table></div>

<p>Note that connection:didReceiveAuthenticationChallenge: can send its message to challenge.sender (much) later, say from a delegate method of an SFCertificateTrustPanel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drops</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-1451</link>
		<dc:creator>drops</dc:creator>
		<pubDate>Wed, 11 Nov 2009 06:00:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-1451</guid>
		<description>Hi Marton,

for all the code that I am posting I am usually creating a new project and then put all that I am interested in into the app delegate. Then I&#039;m looking at the output of NSLog statements. If it is free of errors and has the promised result then I copy/paste all relevant parts into pre sections to get the syntax highlighting.

So I have two problems with having download links: 1) there is no more to see that I am already showing, the rest is just a standard project. 2) if you where to take one of my sample projects and would have to go looking for which parts you need you would take more time reusing my code than by having the essentials before you and copy/pasting from there. 3) when I&#039;m creating code that too complex for a blog post then I&#039;m saving it for my &quot;parts store&quot; or MyAppSales.

Finally most of the time I&#039;ll be using code that I thus discovered in MyAppSales and other projects like Kernseife. So if I propose category classes, most likely you can find them in one of these projects anyway. But your point is taken, if I do that the next time, I will mention from which public project you can copy the files.</description>
		<content:encoded><![CDATA[<p>Hi Marton,</p>
<p>for all the code that I am posting I am usually creating a new project and then put all that I am interested in into the app delegate. Then I&#8217;m looking at the output of NSLog statements. If it is free of errors and has the promised result then I copy/paste all relevant parts into pre sections to get the syntax highlighting.</p>
<p>So I have two problems with having download links: 1) there is no more to see that I am already showing, the rest is just a standard project. 2) if you where to take one of my sample projects and would have to go looking for which parts you need you would take more time reusing my code than by having the essentials before you and copy/pasting from there. 3) when I&#8217;m creating code that too complex for a blog post then I&#8217;m saving it for my &#8220;parts store&#8221; or MyAppSales.</p>
<p>Finally most of the time I&#8217;ll be using code that I thus discovered in MyAppSales and other projects like Kernseife. So if I propose category classes, most likely you can find them in one of these projects anyway. But your point is taken, if I do that the next time, I will mention from which public project you can copy the files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marton.fodor</title>
		<link>http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/#comment-1450</link>
		<dc:creator>marton.fodor</dc:creator>
		<pubDate>Wed, 11 Nov 2009 05:50:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1488#comment-1450</guid>
		<description>Oliver, I&#039;ve been reading your blog for a long time now, and found it very useful. I thing bothers me though. You frequently post very useful and free to use code snippets and categories, but you don&#039;t provide download links for the source code. I know I&#039;m just a whiney bitch, but I keep copy+pasting from your blog every day into my code repo, and a download link instead would be just so nice.</description>
		<content:encoded><![CDATA[<p>Oliver, I&#8217;ve been reading your blog for a long time now, and found it very useful. I thing bothers me though. You frequently post very useful and free to use code snippets and categories, but you don&#8217;t provide download links for the source code. I know I&#8217;m just a whiney bitch, but I keep copy+pasting from your blog every day into my code repo, and a download link instead would be just so nice.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

