react-native-ssl-pinning icon indicating copy to clipboard operation
react-native-ssl-pinning copied to clipboard

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

Open vishnukanth opened this issue 5 years ago • 4 comments

I am getting this issue. Through debug I understood that okHttp3 callback returns SSLHandshakeException. But how to identify whether this is the issue with the certificate or something server side or is there any change in the Android OS level. Because the SSL pinning is working fine in iOS for the same certificates. Here is the code snippet

var more_headers = { Accept: "application/json; charset=utf-8", "Access-Control-Allow-Origin": "", "e_platform": "mobile" }; var headers = header ? { ...more_headers, ...header } : more_headers; fetch(url, { method: method, timeoutInterval: 30000, // milliseconds body: body || bodyData, //disableAllSecurity: true, sslPinning: { certs: [ ".msappproxy.net", "Microsoft IT TLS CA 2", "Baltimore CyberTrust Root" ]

    },
    headers: headers
  })

Can anyone encounter the same issue in Android with the above certificates. Will be glad if someone could help me here

vishnukanth avatar Sep 03 '20 06:09 vishnukanth

@vishnukanth how did you generate the certificates ?

MaxToyberman avatar Sep 18 '20 07:09 MaxToyberman

Facing the same issue. Any solution or workaround?

naveenkirugulige avatar Mar 19 '21 05:03 naveenkirugulige

Hii @MaxToyberman

I am facing the same issue. How to solve this issue. For certificate generating i use this command openssl x509 -in mycert.pem -outform der -out mycert.cer

can you pls help me. Question : Is this a certificate issue or something else?

Thanks

akshayRuptok avatar Mar 31 '22 06:03 akshayRuptok

Hi @akshayRuptok, could you solve this issue?

Hii @MaxToyberman

I am facing the same issue. How to solve this issue. For certificate generating i use this command openssl x509 -in mycert.pem -outform der -out mycert.cer

can you pls help me. Question : Is this a certificate issue or something else?

Thanks

game8149 avatar Feb 01 '24 16:02 game8149