Certificate validation failed with user's installed trusted CA certificates
See original GitHub issueIssue Type
- Bug Report
- Feature Request
- Support Question
Description
I manually installed CA certificate on device and browser works as expected with no warning about SSL certificate. But it does not happen in my Cordova app. I got exception about failed certificate validation when ajax request is executed.
Should app work with manually installed roots?
Information
Command or Code
Environment, Platform, Device
All Android devices. We tried Android 7 and 9.
It worked on iOS with manually installed profiles, but starting with 13.4 (or previous), but it stopped working too with new iOS updates.
Version information
"cordova-android": "^9.0.0",
"cordova-custom-config": "^5.1.0",
"cordova-plugin-auth-dialog": "^0.1.6",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-emm-app-config": "^1.0.2",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-infineatab": "https://479448df5207086fa68a60b812db8a61af4b955e@github.com/Korber-Supply-Chain-Product-Development/cordova-plugin-infineatab.git",
"cordova-plugin-inappbrowser": "^3.2.0",
"cordova-plugin-network-information": "^2.0.2",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-zeep": "0.0.4"
Checklist
- I searched for already existing GitHub issues about this
- I updated all Cordova tooling to their most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Security certificate validation fails - Windows Server
Certificate validation fails when a certificate has multiple trusted certification paths to root CAs. Article; 09/24/2021; 3 minutes to read
Read more >Certificate validation fails when a certificate has multiple ...
This article discusses why certificate validate can fail when a certificate has multiple trusted certifications paths to root CA.
Read more >Common Certificate Validation Errors and How to Avoid Them
SSL /TLS certificate not trusted. A browser will return an error if it is unable to verify that the end-user's certificate has been...
Read more >GlobalProtect client fails with error "Could not verify the server ...
Go to Network > GlobalProtect > Portal > Agent · Click on 'add' and select the Root CA certificate. · Check the box...
Read more >[KB6208] Certificate validation fails when installing or ...
Click Start → My Computer → Add or remove programs → Add/Remove Windows Components · Select the checkbox next to Update Root Certificates....
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
Certificates for your application needs to be configured using the network config file, documentation is at https://developer.android.com/training/articles/security-config
For your use case, you want to add a network_security_config.xml file to res/xml folder:
By default, apps trust only preinstalled CA’s exclusively.
The change was introduced in API 24: https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html
Yes. Create a network_security_config.xml file somewhere, and add it to your config.xml as a resource-file to be copied into the Android platform, and then use edit-config to point the AndroidManifest to it: