Unable to use custom CA with WebView on Android simulator
See original GitHub issueBug description: In our testing environment we use certs we sign with our own CA certificate. I was able to successfully install our CA cert on iOS and visit pages in the react native WebView without issue. On the Android Emulator I still get an error even after installing the customer CA. I know it is working and installed, because Chrome uses the CA and honors it, but when attempting to visit the page through the WebView I get the following:
Error loading page
Domain: undefined
Error Code: 3
Description: SSL error: The certificate authority is not trusted
To Reproduce: Setup a simple app with a WebView, open the app and point the WebView at a page with a ssl cert signed with the custom CA cert.
Expected behavior: The custom CA should be used and the error should not appear.
Environment:
- OS: macOS
- OS version: 11.5.2
- react-native version: 17.0.2
- react-native-webview version: 11.13.0
- Android emulator info: sdk_gphone_x86-userdebug 10 QSR1.210802.001 7603624 dev-keys
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:11
Top Results From Across the Web
Does the Web View on Android support SSL? - Stack Overflow
I should find a way to add the site certificate in root keystore of the phone, so it can be trusted. But on...
Read more >Security with network protocols - Android Developers
A CA signs a server certificate using its private key. The client can then check that the server has a platform-known CA certificate....
Read more >Android Device & Emulator - Proxyman Documentation
How to install Proxyman CA on Android Devices.
Read more >How to Fix SSL Connection Errors on Android Phones
This is the nuclear option, but if all of the other aforementioned suggestions have failed to solve the SSL Certificate error, you may...
Read more >Desired Capabilities - Appium
deviceName, The kind of mobile device or emulator to use, iPhone Simulator ... CA format (country name abbreviation) for Android, e.g. fr_CA ,...
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 FreeTop 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
Top GitHub Comments
This may be the “right” solution: https://developer.android.com/training/articles/security-config
That’s would allow for testing, but if does address the fact that if a CA has been added there shouldn’t be an error thrown when accessing urls signed with that CA.