lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] SMTP client with altcp+mbedtls


From: Kosma Moczek
Subject: [lwip-users] SMTP client with altcp+mbedtls
Date: Wed, 31 Aug 2022 13:56:59 +0200

Hello,

I'm trying to get the SMTP client working over TLS. I've got the following working:

- lwip 2.1.3 working (http, dhcp, etc.)
- mbedtls added to the project and compiling without problems
- email sending works when TLS is disabled
- I can create a config with altcp_tls_create_config_client()

What doesn't work is: 

After smtp.c calls altcp_connect(pcb, &addr, smtp_server_port, smtp_tcp_connected) and the connection to the server is established, the smtp_tcp_connected callback is fired but altcp_mbedtls_lower_connected is not, so there is no ClientHello sent and the connection stalls (SSL is not negotiated, and SMTP client is waiting for a hello from the server). The comment on that function is not encouraging:

/** Connected callback from lower connection (i.e. TCP).
 * Not really implemented/tested yet...
 */
static err_t
altcp_mbedtls_lower_connected(void *arg, struct altcp_pcb *inner_conn, err_t err)


I've traced the code and stepped through it multiple times and I am really lost in all the altcp layering, and can't figure out why the "mbedtls connected" callback isn't firing. Does anyone have a clue what could be wrong? Has anyone ever gotten the altcp mbedtls to work?

--

Kosma Moczek

Electronics Engineer

 

R&D Department

ul. Stargardzka 10

54-156 Wrocław
Poland

phone: +48 71 782 56 45

gsm: +48 785 870 777

 

FOR FINANCIAL PURPOSES THE FOLLOWING ADDRESS SHOULD BE USED:

 

SONEL S.A.
Stanislawa Wokulskiego 11

58-100 Swidnica

Poland


www.sonel.com


SONEL S.A. company duly incorporated and having its legal address at Wokulskiego Str. 11, 58-100 Świdnica, Poland, for which the District Court for Wrocław Fabryczna keeps register no. KRS 0000090121, VAT Number PL8840033448, stock capital 1.400.000 PLN fully paid, BDO 000005929.

I declare that SONEL S.A. belongs to the category of large enterprises within the meaning of Annex I to Commission Regulation (EU) No 651/2014 of 17 June 2014 declaring certain types of aid compatible with the internal market pursuant to Art. 107 and 108 of the Treaty (Official Journal of the European Union L 187 of 26/06/2014, p. 1, as amended).

This message contains confidential information and is a „business secret" of the broadcaster as defined in the Directive (EU) 2016/943. This message is intended only for the addressee (entity or individual). Based on Telecommunications Law, it is prohibited to read, record, store, transmit or otherwise use the content of this message without the consent of the sender. Please be advised that the controller of personal data provided by you is SONEL S.A. Find out more information on our website in the Privacy Policy tab.

If you received this message by mistake, please immediately contact the sender and delete it.


reply via email to

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