react-native-cert-pinner icon indicating copy to clipboard operation
react-native-cert-pinner copied to clipboard

Android pinning not working

Open nullfox opened this issue 5 years ago • 5 comments

As the title says, I'm having trouble getting Android based SSL pinning to be enforced.

I followed the instructions to manually link and the app compiles correctly, however, no pinning seems to get enforced even when I use pins for other websites and my requests load just as they did before.

Is there a way to debug why this wouldn't be working?

My generated pinner java class using reddit's SSL hash (Please note, mydomain.com is just for the purposes of this paste)

package com.criticalblue.reactnative;

import okhttp3.CertificatePinner;

public class GeneratedCertificatePinner {
    public static CertificatePinner instance() {
        CertificatePinner.Builder builder = new CertificatePinner.Builder();

        builder.add("*.mydomain.com", "sha256/ekcBV69V+nWj2avgL3Ko6YUQ2OTGIWWcTMs14g7JsMc=");
        builder.add("*.mydomain.com", "sha256/5kJvNEMw0KjrCAu7eXY5HZdvyCS13BbA0VJG1RSP91w=");

        return builder.build();
    }
}

nullfox avatar Mar 09 '19 15:03 nullfox

me too

xinghuoliaoyuan45 avatar Oct 14 '19 09:10 xinghuoliaoyuan45

Hello, It seems that I encounter the same effect - it appears to me because I am developing for iOS and Android in parallel and a pin rejected by TrustKit(iOS) doesn't make any warning in Android therefore I am questioning the efficacy of this implementation... Is there a way to get an answer?

tomleclercq avatar Apr 13 '20 08:04 tomleclercq

I am facing the same issue as @tomleclercq . Can somebody please help?

annkiitagrawaal-gep avatar Jun 14 '20 13:06 annkiitagrawaal-gep

i have used RN 0.62.2 with Axios is middle way and it working fine with iOS but in Android doesn't working. i try using setup in native site with TrustKit but no luck, anybody or any idea help me to solve this problem? Thanks so much.

vannt1991 avatar Aug 23 '20 16:08 vannt1991

I am facing the same issue. Anyone solve this?

sulfanoaf avatar Apr 21 '21 09:04 sulfanoaf