Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

IOS can not connect to https SSL certificate with config trusty:true but Android can #159

Closed
eggeggeg opened this issue Oct 18, 2016 · 3 comments

Comments

@eggeggeg
Copy link

"react-native": "0.33.0",
"react-native-fetch-blob": "^0.9.6",
XcodeVersion 7.3.1

as title,

and I checked didRectiveChallenge function in RNFetchBlob.xcodeproj/RNFetchBlobNetwork.m

When I connect to HTTPS with using trusty:true , didRectiveChallenge will not be entered , so I get failed result.

But if I remove the if block ,

if ([options valueForKey:CONFIG_TRUSTY] != nil) { completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]); }

it will connect successfully,

I find out the function does not work because of this code

NSURLSessionAuthChallengePerformDefaultHandling

I change this it can work

NSURLSessionAuthChallengeUseCredential

Can someone tell me why? Plz

@wkh237
Copy link
Owner

wkh237 commented Oct 21, 2016

@eggeggeg , after some tests I think this is a bug. I'll fix this part and release a beta version in these days, thank you 👍

wkh237 added a commit that referenced this issue Oct 21, 2016
wkh237 added a commit that referenced this issue Oct 21, 2016
@wkh237 wkh237 added the beta label Oct 21, 2016
@wkh237
Copy link
Owner

wkh237 commented Oct 22, 2016

@eggeggeg , I've published 0.10.0-beta.4 which should fix this bug, please upgrade the package and verify the fix, thank you 😄

@eggeggeg
Copy link
Author

@wkh237 , after my test, it work for me,thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants