Re: How to handle bad certificate error in NSURLDownload?

2008-05-22 Thread parag vibhute
Following is code which I have implemented: - (void)download:(WebDownload *)download didFailWithError:(NSError *)error { // release the connection [download release]; // inform the user //NSLog(@Download failed! Error - %@ %@, //[error

Re: How to handle bad certificate error in NSURLDownload?

2008-05-21 Thread ainxow
On May 19, 2008, at 1:51 PM, Jens Alfke wrote: I would guess that the Security framework is requiring user confirmation to allow the app to bypass certificate checking. Well, no. NSURLRequest's setAllowsAnyHTTPSCertificate:forHost: does exactly that, immediately and without user

How to handle bad certificate error in NSURLDownload?

2008-05-19 Thread parag vibhute
Hi all, I am using NSURLDownload class to download a file through https. But I get error bad server certificate. I know this error occurs when HTTPS server has bad certificate. I want to allow this download even though certificate is bad. So can anybody tell how can I handle this? I searched

Re: How to handle bad certificate error in NSURLDownload?

2008-05-19 Thread Jens Alfke
On 19 May '08, at 5:07 AM, parag vibhute wrote: I am using NSURLDownload class to download a file through https. But I get error bad server certificate. I know this error occurs when HTTPS server has bad certificate. I want to allow this download even though certificate is bad. Why?

Re: How to handle bad certificate error in NSURLDownload?

2008-05-19 Thread parag vibhute
Thanks for url. I implemented same but whenever I launched my application it asks to change trust settings. Why is it like that? Other thing is my https server requires username password so now I am using WebDownload class (which is subclass of NSURLDownload) but it does ask about username

Re: How to handle bad certificate error in NSURLDownload?

2008-05-19 Thread Jens Alfke
On 19 May '08, at 8:19 AM, parag vibhute wrote: I implemented same but whenever I launched my application it asks to change trust settings. Why is it like that? What exactly did you mean by same? Which code did you implement? I would guess that the Security framework is requiring user

Re: How to handle bad certificate error in NSURLDownload?

2008-05-19 Thread Nick Zitzmann
On May 19, 2008, at 1:27 PM, Jack Repenning wrote: Does NSURLDownload end up using OpenSSL to certify? In which case, it would run afoul of the problem that OS X OpenSSL ships with no CA chain. No; the NSURL stuff uses Apple's SSL engine (CDSA), which does not use OpenSSL. Nick

Re: How to handle bad certificate error in NSURLDownload?

2008-05-19 Thread Jens Alfke
On 19 May '08, at 12:27 PM, Jack Repenning wrote: Does NSURLDownload end up using OpenSSL to certify? In which case, it would run afoul of the problem that OS X OpenSSL ships with no CA chain. No. None of Apple's security software uses OpenSSL; that library's in the OS for