---
title: "HHTP client with TLS"
url: "https://maker.wiznet.io/forum/13910"
markdown_url: "https://maker.wiznet.io/forum/13910/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "rmeldo"
created: "2020-06-28T09:04:49+09:00"
last_activity: "2022-12-21T00:20:41+09:00"
language: "en"
views: 2978
replies: 5
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# HHTP client with TLS

## Question

Asked by rmeldo on 2020-06-28 in Ethernet Chips.

Hi all,
this is my first post to the forum.

I want to send GET or POST requests to servers which require a HTTPS connection. This is probably a common requirement but I haven’t been able to find relevant older threads on the forum.

I am using a W5500 chip driven by a STM32F446 microcontroller

I was able to compile and run the Wiznet examples on Github for an HTTP client:

<https://github.com/WIZnet-ioLibrary/W5x00-HTTPClient>

and also for secure TLS connection

<https://github.com/WIZnet-ioLibrary/W5x00-TLS>

However I am really struggling to understand how to merge the two concepts together and I need some pointers or better an example to get me started.

Any suggestions would be appreciated.
Thanks
Riccardo

## Replies

### Reply 1 by bangbh, 2020-06-30

Hi.
You can find the functions of a name that begins with wiz_tls_xxxx.
like wiz_tls_connect(), wiz_tls_read(), wiz_tls_write()…

You should use those functions on the httpClient.c file instead of using previous functions like connect(), send(), recv()…

I hope you succeed.
Thanks.

### Reply 2 by naveenkumarb, 2021-06-28 (in reply to reply 1)

Hi,

I tried the TLS example. I can able to port the code in STM32F401RE. Initially I got the error but after changing the #define MBEDTLS_MPI_MAX_SIZE 256, I got successful handshake with server. I need to connect to server using MQTT+TLS. Any examples or material would be very useful.

I successfully tested the MQTT example. Works over 1883.

Thanks,
Naveen

### Reply 3 by Hoa Le Van, 2021-08-15

Hi Wiznet company,
I will make project with a lot of device, which is used W5500.
Could you help to knows how to use TLS with MQTT?
Thanks and best regard

### Reply 4 by nickPro, 2021-09-21

Has anyone been able to get the W5500 to connect to https? Even if the certificate is invalid, that would be OK.

Are there any examples?

### Reply 5 by nogema, 2022-12-21

Hello,
I’m trying since few days to run the example **[W5x00-TLS](https://github.com/WIZnet-ioLibrary/W5x00-TLS)** from Wiznet but the handshake stays blocked at the step `MBEDTLS_SSL_SERVER_HELLO`. My board is a Nucleo-L152RE
Looking for some help on the forum, I have seen that you successed to run this example. What kind of fix have you done to run the example on your board ?

Regards

Maxime

---

Source: https://maker.wiznet.io/forum/13910
