When I try to connect to my web server using NSURLConneciton thusly:

loadedData = [ NSURLConnection sendSynchronousRequest:request 
returningResponse:&response error:&error ];

The data comes back with a zero length. Inspecting the error reveals that it's 
an untrusted server certificate error. Is there any way to ignore certificates 
in my request, or to tell NSURLConnection to ignore/not use them or to get the 
data anyway? I don't really care about security in this instance - I just need 
the returned data. I verified that my URL is correct by typing it into Safari. 
My error object:

<CFDictionary 0x16b250f0 [0xa05001a0]>{type = immutable, count = 6, capacity = 
6, pairs = (
    0 : <CFString 0xa05dcd68 [0xa05001a0]>{contents = 
"NSErrorPeerCertificateChainKey"} = <CFArray 0x16b39e30 [0xa05001a0]>{type = 
mutable-small, count = 3, values = (
    0 : <SecCertificate 0x16b287f0 [0xa05001a0]>
    1 : <SecCertificate 0x16b46c30 [0xa05001a0]>
    2 : <SecCertificate 0x16b1f5b0 [0xa05001a0]>
)}
    1 : <CFString 0xa05d5ed8 [0xa05001a0]>{contents = "NSUnderlyingError"} = 
Error Domain=kCFErrorDomainCFNetwork Code=-1202 UserInfo=0x4efbf0 "untrusted 
server certificate"
    3 : <CFString 0xa05dcd58 [0xa05001a0]>{contents = "NSErrorFailingURLKey"} = 
<CFURL 0x4b7830 [0xa05001a0]>{type = 15, string = 
http://staging.iwin.com/drm?sid=1737980694905205001&hid=2A6A41FD0095959FF595959FF22A6A41FD05&lid=13&[email protected]&act=2&aid=0&pid=0,
 base = (null)}
    4 : <CFString 0xa05d5fb8 [0xa05001a0]>{contents = 
"NSErrorFailingURLStringKey"} = <CFString 0x4efee0 [0xa05001a0]>{contents = 
"http://staging.iwin.com/drm?sid=1737980694905205001&hid=2A6A41FD0095959FF595959FF22A6A41FD05&lid=13&[email protected]&act=2&aid=0&pid=0"}
    6 : <CFString 0xa05d5ec8 [0xa05001a0]>{contents = "NSLocalizedDescription"} 
= <CFString 0x3815a60 [0xa05001a0]>{contents = "untrusted server certificate"}
    7 : <CFString 0xa05dcd88 [0xa05001a0]>{contents = 
"NSErrorClientCertificateStateKey"} = <CFNumber 0x410cc0 [0xa05001a0]>{value = 
+0, type = kCFNumberSInt32Type}
)}



      
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to