Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1529

https problem with Android application local testing

$
0
0

I'm trying to test my android app locally.The app has to fetch data from 192.168.1.16.
The local server certificate is a self signed certificate, so I did what I found here and there on stackoverflow and other sites (special thanks to https://stackoverflow.com/a/71542188/3872061):
. stored the certificate in res/raw/laragon_certif
. created a res/xml/network_security_config.xml pointing to the @raw/laragon_certif
. added attribute android:networkSecurityConfig="@xml/network_security_config" on node application in manifest.xml

Now all previous errors and exceptions changed to the following:

javax.net.ssl.SSLPeerUnverifiedException: Hostname 192.168.1.16 not verified:    certificate: sha1/Gr8h0ea/mhIMIADb7CMK47K8Moo=    DN: CN=laragon,OU=IT,O=Laragon,L=Singapore,ST=Singapore,C=SG    subjectAltNames: [localhost, ..., ..., ..., 192.168.1.16]

So it seems the app correctly finds the self-signed certificate and does not reject it any more, but it doesn't consider 192.168.1.16 to be covered by this certificate.


Viewing all articles
Browse latest Browse all 1529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>