Hello,
I've been looking for a solution to connection to a self-signed certificate server (https://web-toulon.isen.fr) from a UIWebView. I still can't make it work, but I saw this stackoverflow topic : http://stackoverflow.com/questions/933331/how-to-use-nsurlconnection-to-connect-with-ssl-for-an-untrusted-cert and I don't know how to implement this on my project.
I'm kind of new to iPhone development, so can you tell me how and where I can write the piece of code given in the topic in order to make it work properly ?
Here is what I currently have for the loading part (so, it's pretty basic)
So, That doesn't work, unless I write this private API in the AppDelegate :
What I basically want to do is to avoid this private API call :
Is there anything 'simple' (well, if it's not simple but if it works, it's great too
) that can do what I'm looking for ?
Thanks a lot for your help !
Adrien Bertrand
I've been looking for a solution to connection to a self-signed certificate server (https://web-toulon.isen.fr) from a UIWebView. I still can't make it work, but I saw this stackoverflow topic : http://stackoverflow.com/questions/933331/how-to-use-nsurlconnection-to-connect-with-ssl-for-an-untrusted-cert and I don't know how to implement this on my project.
I'm kind of new to iPhone development, so can you tell me how and where I can write the piece of code given in the topic in order to make it work properly ?
Here is what I currently have for the loading part (so, it's pretty basic)
Code:
[moodle loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://web-toulon.isen.fr/moodle/"]]];
Code:
@implementation NSURLRequest(IgnoreSSL)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end
What I basically want to do is to avoid this private API call :
Code:
+(BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
Is there anything 'simple' (well, if it's not simple but if it works, it's great too
Thanks a lot for your help !
Adrien Bertrand