addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrosseditemptyheartfacebookfolderfullheartglobegmailgoogleimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

The Charlotte iOS Developers Meetup Message Board › Invalid Certificates

Invalid Certificates

Sean R.
user 9537049
Charlotte, NC
Post #: 28
It appears that over the weekend my company decided to switch SSL certificate providers and now use GoDaddy; so now when I call my web service using https I am getting an invalid certificate warning.

Tried using the connection:willSendRequestForAuthenticat­ionChallenge to tell the connection to continue but it's not working.

Anyone have any idea's?
A former member
Post #: 4
If you're using a networking library like AFNetworking or ASIHTTPRequest, its fairly trivial to tell the request to ignore invalid SSL certificates.

I'd recommend using those libraries over trying to mess with core level networking operations.
Sean R.
user 9537049
Charlotte, NC
Post #: 29
Thanks for the reply Mark - I have not used those libraries yet and I'm using the core framework, maybe another time.

But I did finally solve my issue with the following

-(void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChalleng­e:(NSURLAuthenticationChallenge *)challenge{

[[challenge sender] useCredential:[NSURLCredential credentialForTrust:challenge.protectionS­pace.serverTrust] forAuthenticationChallenge:challenge];
}
A former member
Post #: 5
Glad you figured it out.

In AFNetworking, you'd just have to:

#define AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICA­TES 1

And ASIHTTPRequest you set up your individual request and then do:

[request setValidatesSecureCertificate:NO];
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy