lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #54827] altcp_mbedtls_bio_recv returns MBEDTLS_ERR_SSL


From: Richmond Umagat
Subject: [lwip-devel] [bug #54827] altcp_mbedtls_bio_recv returns MBEDTLS_ERR_SSL_WANT_READ when connecting to Azure IoT
Date: Fri, 12 Oct 2018 06:13:13 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

URL:
  <https://savannah.nongnu.org/bugs/?54827>

                 Summary: altcp_mbedtls_bio_recv returns
MBEDTLS_ERR_SSL_WANT_READ when connecting to Azure IoT
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: richmond_umagat
            Submitted on: Fri 12 Oct 2018 10:13:12 AM UTC
                Category: apps
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.1.0

    _______________________________________________________

Details:

Hi,


I'm trying to support connectivity with Azure IoT using mbedTLS with LWIP but
TLS handshake fails in ssl_parse_server_hello() with
MBEDTLS_ERR_SSL_WANT_READ. 

Below is the callstack:
ssl_parse_server_hello() at ssl_cli.c:1484
mbedtls_ssl_read_record() at ssl_tls.c:3817
mbedtls_ssl_read_record_layer() at ssl_tls.c:3956
mbedtls_ssl_fetch_input() at ssl_tls.c:2433
ssl->f_recv( ssl->p_bio, ssl->in_hdr + ssl->in_left, len ) at
LWIP's altcp_mbedtls_bio_recv(void *ctx, unsigned char *buf, size_t len)
return MBEDTLS_ERR_SSL_WANT_READ;

Hypothesis:
Azure IoT Hub sends a certificate chain of 4 certificates. I think it might be
related to this.

Some context below:
1. I have already supported connectivity with AWS IoT, AWS Greengrass and GCP
IoT with mbedTLS+LWIP. 
2. I am able to connect successfully to my Azure IoT Hub using MQTT.FX with
the same MQTT settings and TLS ca, certificates and private key. (so there is
no issue with cloud settings nor with the MQTT and TLS credentials.)

Any insights will be appreciated. Thank you!




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54827>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]