I'm making an http request with pinch from the react-native-pinch library, it works with almost all those that have a valid certificate, except one (the one that is specified), I try to omit the certificate and neither the code:
pinch.fetch(' https://club.zippyttech.com:8080', {
method: 'GET',
headers: { Accept: 'application/json',
'Content-Type': 'application/json',
'Cache-Control':'no-cache' },
timeoutInterval: 10000, // timeout after 10 seconds
// sslPinning: { cert:'admin.clubdegolfdepanama.com'} // omit the 'cert' or 'certs' key, 'sslPinning' can be ommited as well
}).then((response) => {
return response;
}).
catch((reason) => {
console.log('There has been a problem with your fetch operation: ' + reason.message);
// ADD THIS THROW error
throw reason;
})
When I look at the code in debug mode from Android Studio I get this error
Error - javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.