Fix SSL Handshake failed: Received fatal alert: certificate_unknown on phone

"SSLHandshake: Remote host closed connection during handshake. " "SSLHandshake: Received fatal alert: certificate_unknown"

The reason you see the error "SSLHandshake: Remote host closed connection during handshke." because the request was sent out from web browser over the HTTPS, if all the requests or responses sent out over HTTP, you won't see this error in Charles because all requests sent out over HTTP are plain message without any encrypted. Either request or response sent out over HTTP or HTTPS, it depends on the website itself development system. As we said message over HTTP is plain message without any encrypted, then it will have less security. But if request or response sent out over HTTPS, all message are encrypted and have more security than over HTTP.

All messages exchanged between client and server are encrypted over HTTPS. If you want to see decoded plain text message between client end of phone and server over HTTPS, you have to install SSL certificate for Charles on your phone device, to let Charles translate these encrypted message for you by passing the installed SSL certificate between client and server. Check More details.


I am going to show you here with the details about how to install Charles ssl certificate on iPhone or android devices. Check this video, it will show you how to install Charles SSL Root Certificate on android phone.




The above video shows how set up Charles on Android phone There will be the same way to install ssl certificate on iPhone and android phone for Charles Proxy. 

On iPhone, now will show you how to set up Charles on iPhone:
#1. Go to Charles "Help" > "local IP Address", to found Proxy IP address. 
#2  Go to iPhone Settings> Wifi network, and select Wifi that was set up from you PC.
#3  Click on a blue disclosure arrow, scroll down to the HTTP Proxy setting, tap "Manual". Enter the IP address you found in step #2 into "Server field".
#4  In port field to fill port number. the port number you can found from Charles "Proxy"> "Proxy Settings", On Proxies tab, and in Http Proxy form.
#5  Leave Authentication set to Off.
#6  Go to Proxy>SSL Proxy Settings, to make sure In SSL Proxying tab check Enable SSL Proxying. and put "*" in Host and * in Port to filter all hosts and Ports.


On Android phone,
#1. Go to Proxy> Proxy Settings








On Proxies tab,  in Http Proxy form to fill out port number. Here you leave the default port number 8888 unchanged.
 
#2. Go to Proxy>SSL Proxy Settings

 

In SSL Proxying tab check Enable SSL Proxying
Click Add button to add * in Host and * in Port to filter all hosts and Ports, click OK button. Here you can put any Host or Port that you want to enable SSL Proxying for those Host and Port only.


#3. Go to Help > local IP Address


 to find you proxy IP address
 
 #4. Go to your phone Settings > Wifi
And long press the hotspot wifi that you set up from your computer, to bring up "Manage network Settings"
Fill in the password for you wifi
Check "Show advanced options"
In Proxy to choose "Manual"  
Fill IP address that you get from #3 in Proxy hostname and default "8888" in Proxy port. Save it.

#5. Go to web browser on the phone, in url type www.charlesproxy.com/getssl to install Charles certificate automatically. If you failed to download SSL certificate in the browser, see my another post how to fix this installation issue. Failed to install Charles SSL Certificate due to network.