Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was 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

Description

@eggeggeg

"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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions