samitha9125/react-native-pinch-new

Skipping validation not working

Opened this issue · 0 comments

I am trying to reach an localhost API skipping self signed cert trust validation, I know it's a security flaw, but it's what the seller tells me to do. Is empty sslPinning supposed to do it?

pinch.fetch("https://127.0.0.1:2001/v1/transactions/init",
{
method: 'POST',
headers: {
"X-SOURCE": "COMERCIA"
},
body,
timeoutInterval: 10000,
ignore_ssl: true,
sslPinning: {}
}).then(res => console.log("COMERCIA INTI: ", res))
.catch(err => console.log("ERROR COMERICA", err))

Building on Android, and this is what i get:

{"code": -998, "message": "javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.", "reason": "Unknown error"}