# HTTPS requests not working on Android

**URL:** <https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [January 10, 2015, 8:00pm UTC](https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654 "2015-01-10T20:00:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e281dc471](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e281dc471](https://forums.unrealengine.com/u/anonymous_user_e281dc471)\
**Post date:** [January 10, 2015, 8:00pm UTC](https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654/1 "2015-01-10T20:00:22Z")

</div>

Hi,  
HTTPS requests not working on Android… For example works but doesn’t work…  
Anyone know how to resolve this?

Thank you.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e281dc471](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e281dc471](https://forums.unrealengine.com/u/anonymous_user_e281dc471)\
**Post date:** [January 11, 2015, 12:39am UTC](https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654/2 "2015-01-11T00:39:21Z")

</div>

I called Response.IsValid() and it returns false so Reponse is not valid…

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [January 13, 2015, 7:48pm UTC](https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654/3 "2015-01-13T19:48:22Z")

</div>

In the Project Settings dialog, look in the Engine - Network section for Libcurl Verify Peer checkbox. Try turning it off and see if it works.

---

<div class="post-metadata">

**Author:** ![MrHwang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrHwang](https://forums.unrealengine.com/u/MrHwang)\
**Post date:** [April 15, 2016, 7:28am UTC](https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654/4 "2016-04-15T07:28:42Z")

</div>

I had same problem.

I used my own certification which works fine with Libcurl-Verify-Peer option off.

But in Android, I had following logs with console ‘log loghttp all’

'SSL: certificate subject name ‘\<some name\>’ does not match target host name ‘\<requested url\>’

I googled it and solved by putting following codes

curl\_easy\_setopt(EasyHandle, CURLOPT\_SSL\_VERIFYHOST, 0L);

just after

curl\_easy\_setopt(EasyHandle, CURLOPT\_SSL\_VERIFYPEER, 0L); at the FCurlHttpRequest::FCurlHttpRequest()

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [April 15, 2016, 6:38pm UTC](https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654/5 "2016-04-15T18:38:54Z")

</div>

You don’t need to do this in 4.11 anymore. Android now registers a PEM file with certificates. At startup it checks if it has already generated a PEM file, if not, it either uses an override ca-bundle.pem from your project’s Content/CurlCertificates directory (add this as a non-asset directory in Packaging project settings), or it will generate one from the contents of /system/etc/security/cacerts and add any optional certificates from Content/CurlCertificates/ca-additions.pem if provided. The code for this is in FCurlHttpManager::InitCurl().

---

<div class="post-metadata">

**Author:** ![Arda\_TR\_671](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arda\_TR\_671](https://forums.unrealengine.com/u/Arda_TR_671)\
**Post date:** [March 3, 2023, 6:24pm UTC](https://forums.unrealengine.com/t/https-requests-not-working-on-android/18654/6 "2023-03-03T18:24:49Z")

</div>

Thanks a lot !
