Search code examples
iphoneobjective-casihttprequest

Why ASIHTTPRequest still ask for ssl even though I close it?


A connection failure occurred: SSL problem

 NSURL *url = [NSURL URLWithString:@"https://www.trevesstudios.com/indexappyness1.php"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];

[request setPostValue:year1 forKey:@"year"];
[request setPostValue:appy_level forKey:@"appy_level"];
[request setPostValue:reasons forKey:@"reasons"];
[request setPostValue:country forKey:@"country"];
[request setPostValue:city forKey:@"city"];
[request setPostValue:sex forKey:@"sex"];
[request setRequestMethod:@"POST"];
[request setValidatesSecureCertificate:NO];
[request setDelegate:self];
[request startAsynchronous];

Solution

  • I believe the error may lie with your SSL certificate rather than with ASIHTTPRequest.

    If I try to access https://www.trevesstudios.com/indexappyness1.php from Chrome or IE I get the following error

    Unable to make a secure connection to the server. This may be a problem with the server or it may be requiring a client authentication certificate that you don't have.

    however if I drop the secure connection and just try to access it using plain ol' HTTP the pages loads as normal without error.