I am building a messaging app for android (and hopefully for IOS soon).
While testing it on my local network (localhost), it worked fine. However, after I created a site to test it and changed the source code so it will make requests to the test site instead, the requests failed.
Here are the error logs from the simulator and the an android emulator I used:
Simulator
16:49:57.705 table: 09606430 {
16:49:57.705 [responseType] => "text"
16:49:57.705 [phase] => "ended"
16:49:57.705 [bytesEstimated] => 0
16:49:57.705 [response] => "Certificate required"
16:49:57.705 [name] => "networkRequest"
16:49:57.705 [bytesTransferred] => 0
16:49:57.705 [status] => -1
16:49:57.705 [url] => "https://pinged.ml/engine/v0.5/rest.php/login"
16:49:57.705 [isError] => true
16:49:57.705 [requestId] => userdata: 09604418
16:49:57.705 }
Android Logcat
I/Corona ( 4322): table: 0xb87cb960 {
I/Corona ( 4322): [responseType] => "text"
I/Corona ( 4322): [phase] => "ended"
I/Corona ( 4322): [bytesEstimated] => 0
I/Corona ( 4322): [response] => "javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb88070c0: Failure in SSL library, usually a protocol error"
I/Corona ( 4322): "error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x8c27a990:0x00000000): https://pinged.ml/engine/v0.5/rest.php/login"
I/Corona ( 4322): [name] => "networkRequest"
I/Corona ( 4322): [bytesTransferred] => 0
I/Corona ( 4322): [status] => -1
I/Corona ( 4322): [url] => "https://pinged.ml/engine/v0.5/rest.php/login"
I/Corona ( 4322): [isError] => true
I/Corona ( 4322): [requestId] => false
I/Corona ( 4322): }
I am guessing it has something to do with the SSL certificate. On my local machine I was the CA so I could install the certificates myself and get rid of any warnings but on the test site, I used Let’s Encrypt.
Now, my question is, is there any way to tell the network.request() API to ignore certificate verification?