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.
See original GitHub issueI 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: 'POST',
body: body,
pkPinning: true,
disableAllSecurity: false,
// your certificates array (needed only in android) ios will pick it automatically
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?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
certificate for this server is invalid - Stack Overflow
The certificate for this server is invalid. You might be connecting to a server that is pretending to be "DOMAIN NAME" which could...
Read more >Get "the certificate for this server is invalid" error? How to fix it
Follow these quick tips when getting certificate errors on your iPhone, iPad, or iPod · Restart your device · Force close the app...
Read more >The certificate for this server is invalid - Apple Community
You might be connecting to a server that is pretending to be 'msds.open.ac.uk', which could put your confidential information at risk.
Read more >KB409600: "The certificate for this server is invalid. You might ...
You might be connecting to a server that is pretending to be https://YourWebsite.com which could put your confidential information at risk.
Read more >How To Fix 'The Certificate For This Server Is Invalid' On Mac
Try restarting the device as some minor issues may pop up with the error 'The certificate for this server is invalid'. Restarting the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The certificate generated by using the key chain of Mac can solve this problem
@in-html If you resolved this issue, can you share the solution? Working well on android, but not on iOS.