Regarding HTTPS client implementation

I wanted to integrate https client in my code, for that I referred the sample code https_client and also the code available on Wifi Fundamentals course.
When I executed the course for example.com it got connected to the server but the hostname on the browser shows that it is non secure. Similarly when I tried using it for google.com by generating a separate certificate for it it was giving me 

"Software caused connection abort" error. I actually wanted to use https for google cloud storage to upload the files, for that I created a separate private bucket to upload the same but it was also giving me the same error 
I am not able to understand exactly that where the actual issue is is it related to the certificate or maybe something else 

I am providing the code for reference 

Updated_home_without_wifi 2.zip
Related