iphone - HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted -


I have an application that is connected to http error when I tried to get Https that the root certificate is not trustworthy is. I have got the URL for my site certificate, its CA certificate, and the CA certificates and they have been added on the phone via Safari. Now when I go to Preferences -> General -> Profile then I can see all my certificates which go all the way to the series. Each certificate has a red signed label even though I get the NSURLErrorServerCertificateUntrusted error when I connect it. Where am I trying to go?

Any help will be great. Only the second thing that can affect it is that I am connecting with a strange port, then my URL is www.domain.com: Port. Does Port Number One Certificate - Does not Match Domain Name?

Now I have used the iPhone configuration feature to add a configuration profile to the phone. It has my original certificate, certificate and site certificate. Profile of this phone is verified. In the details I can see my three certificates. But when I try to connect, I still get an incredible certificate error. any suggestion?

Just trying to see if someone else can help it?

NSURL is a supported API to ignore bad certificates during a connection connection. To do this, just add something to your NSURLConnection representative:

  - (BOOL) Connection: (NSURLConnection *) Connection Can Authorize AZainStraftSpace: (NSURLProtectionSpace *) Security Location {Return [Security Authentication is EqualToString : NSURLAuthenticationMethodServerTrust]; } - (Zero) Connection: (NSURLConnection *) Connection ReceivedActivity Challenge: (NSURLAuthenticationChallenge *) Challenge {if ([challenge.protectionspace.authenticationMethodEqualToString: NSURLAuthenticationMethodServerTrust]) (... if the user allows a connection despite a bad certificate. ..) [Challenge. Use Cenderel Credential: [NSL Credential Credential Forestarter: Challenge. PravitySpace. ServerTrust] Payment Challenge: Challenge]; [the challenge. Continue. Authority challenge for no credentials: challenge]; }  

Note that the connection: didreceiveAuthenticationChallenge: to challenge its message after presenting a dialog box to the user, if necessary. (Very) can send later, etc.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -