diefferson / http_certificate_pinning

Https Certificate pinning for Flutter
Apache License 2.0
84 stars 71 forks source link

fix ios parallel #16

Closed thelonecabbage closed 2 years ago

thelonecabbage commented 2 years ago

On iOS devices (and emulators) certpinning cancels prior Dio() get requests, only returning the last one. Making parallel requests impossible.

var http = new Dio();
    http.interceptors
        .add(CertificatePinningInterceptor(allowedSHAFingerprints));
    var future1 = http.get('https://...');
    var future2 = http.get('https://...');
    var future3 = http.get('https://...');

only future3 will return with data.

The PR, patches to serialize cert pinning requests on iOS as well as caching cert pinning results.

diefferson commented 2 years ago

Thanks @thelonecabbage! I have merged a previous PR, can you resolve the conflicts, please?

thelonecabbage commented 2 years ago

@diefferson I fixed the merge conflicts