# coreHTTP basic TLS demo "TLS Handshake fails"

**URL:** <https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709>\
**Category:** Libraries\
**Tags:** debug, tutorial\
**Created:** [April 3, 2024, 5:25am UTC](https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709 "2024-04-03T05:25:29Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [April 19, 2024, 10:03am UTC](https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709/21 "2024-04-19T10:03:31Z")

</div>

To be honest, at this point, I am not sure if this is the reason of failure as I am not TLS expert. One thing that you can try is try with some other servers. Posting on mebdTLS forums may also help you to get better response.

---

<div class="post-metadata">

**Author:** ![ashvajit](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@ashvajit](https://forums.freertos.org/u/ashvajit)\
**Post date:** [April 19, 2024, 10:34am UTC](https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709/22 "2024-04-19T10:34:29Z")

</div>

> [@aggarg](#):
>
> try with some other servers.

I have also tried with :

- [https://httpbun.com/](https://httpbun.com/)
- [https://www.google.com/](https://www.google.com/)

But I not able to pass the handshake.

Can you please try to connect coreHTTP windows simulator example with either of the server. There could be something that I am doing wrong.

> [@aggarg](#):
>
> Posting on mebdTLS forums may also help you to get better response.

I also tried this but didn’t heard back from them. 🙁

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [April 21, 2024, 4:50pm UTC](https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709/23 "2024-04-21T16:50:49Z")

</div>

> [@ashvajit](#):
>
> I exported these certificates as shown in the image below

You need to find the root of the chain using the following command and use that as Root CA -

```auto
openssl s_client -connect httpbun.com:443 -tls1_3 -showcerts

```

I am able to connect to `httpbun.com` and send a GET request successful with the following patch: [connect\_to\_httpbun.patch](https://forums.freertos.org/uploads/short-url/h1bEqvA6jZQ1EN0KImtlQY5Hggq.patch) (10.9 KB)

Do the following to use the above patch:

1. Clone [GitHub - FreeRTOS/FreeRTOS: 'Classic' FreeRTOS distribution. Started as Git clone of FreeRTOS SourceForge SVN repo. Submodules the kernel.](https://github.com/FreeRTOS/FreeRTOS.git).
2. Apply the patch.
3. Build and run the following project: [FreeRTOS/FreeRTOS-Plus/Demo/coreHTTP\_Windows\_Simulator/HTTP\_Mutual\_Auth at main · FreeRTOS/FreeRTOS · GitHub](https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_Mutual_Auth)

Thanks.

---

<div class="post-metadata">

**Author:** ![ashvajit](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@ashvajit](https://forums.freertos.org/u/ashvajit)\
**Post date:** [April 22, 2024, 5:48am UTC](https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709/24 "2024-04-22T05:48:54Z")

</div>

Thanks, it is also working with this configuration on my MCU with my intended server.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [April 22, 2024, 5:59am UTC](https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709/25 "2024-04-22T05:59:46Z")

</div>

Glad that it worked for you!

[Previous page](https://forums.freertos.org/t/corehttp-basic-tls-demo-tls-handshake-fails/19709.md?page=1)
