I'm trying to send out a very simple ASIHTTPRequest with https. Although I have set the validatesSecureCertificate flag to "NO", I still get an odd response for my request:
A connection failure occurred: SSL problem (Possible causes may include a bad/expired/self-signed certificate, clock set to wrong date)
The code I am using is pretty straightforward, I am removing the actual parameters for security reasons:
NSURL *url = [NSURL URLWithString:@"https://secured.cet.ac.il/KotarServices/getMyBooks.aspx?username=xxxxxxxx&password=xxxxx&packageid=x"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDidFailSelector:@selector(getMyBooksFailedWithError:)];
[request setDidFinishSelector:@selector(getMyBooksFinishedWithResult:)];
[request setDelegate:self];
[request setValidatesSecureCertificate:NO];
[request startAsynchronous];
Digging deeper into the code, I see that the request fails on a "-9807" error code, which is related only to the operating system and has nothing to do with the server I am interacting with (SecureTransport.h maps this out to be "invalid certificate chain"). Any ideas how to overcome this issue? Thanks in advance.