react-native-ssl-pinning
react-native-ssl-pinning copied to clipboard
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “...” which could put your confidential information at risk. #106
I am trying to do this but get error (IOS 14.2):
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “https://...” which could put your confidential information at risk.
I copied the .cer certificate into xcode and do this:
const response = await fetch(url, {
method: 'GET',
sslPinning: {
certs: ['my_cer_file_without_extension'], // your certificates name (without extension)
},
headers: {
Accept: 'application/json; charset=utf-8',
'Access-Control-Allow-Origin': '*',
e_platform: 'mobile',
},
});
Am I doing something wrong or is it no longer working? Any ideas?
Is your cert a self signed?
Is your cert a self signed?
Yes
Is your cert a self signed?
Yes
Yeah won't work AFAIK. Unless you patch the package code to accept invalid cert.
@suleymanbasbug Hey have you find a way to solve this issue, I'm struggling on it too
@Aeners Hey, man. I stopped using this package. We implemented it natively.
@suleymanbasbug Can you please share you native implementation to us. It can be in form of a blog.