views:

434

answers:

1

Hi Guys,

I have an iPhone application which has to communicate with a RESTfull WCF service over a secured connection(HTTPS) with a self signed certificate.

The WCF service returns XML which is parsed within the app.

I have signed the certificate with SelfSSL and installed in on a Windows Server 2003 machine(IIS 6.0).

An example of a WCF call would be: https://localhost/Service/Service.svc/{username}/{email}

The communication used to be over HTTP so some of the code on the iPhone has to be rewritten.

For communication I had been using NSXMLParser initWithContentsOfURL(HTTP) and now I have to useNSURLRequest and NSURLConnection.

Therfore I have to use category which implements the methods allowsAnyHTTPSCertificateForHost(always returns YES) and setAllowsAnyHTTPSCertificate.

So far so good.

Now my questions:
1. Is a self signed certificate as secure as a CA certificate at the given context(Only for WCF calls)
2. Is the connection realy secured when I implement allowsAnyHTTPSCertificateForHost(which always returns YES)
3. Can I programmatically import a self signed certificate on a iPhone
4. How does iPhone handle a request with a CA certificate(against which certificate does it validate the certificate from the server.

Thanks in advance.

A: 

Hi Dutchie,

I am a new to iphone & Web service call from iphone. I am able to call WCF web service deployed on IIS using http protocol but stuck with https with self signed certificate.

Service call is getting rejected from IIS server. :( My self signed certificate does't have any userid or email id but it does have a password. I have used selfssl tool to create certificate which is a part of IIS toolkit.

Do you have any suggestions for getting this worked?

Thanks in advance!

Raj

Raj