Topic: Receiving handshake response in TLSv1.3 after negotiation is finished
I'm trying the wolfssl_tcp_client demo app from the Microchip Harmony 3 repo:
https://github.com/Microchip-MPLAB-Harm … tcp_client
This app allows you send an openurl command with the web page you want to GET and forwards the response to a debug serial port. The code of the app is here:
https://github.com/Microchip-MPLAB-Harm … /src/app.c
Although I had to add the forwarding code (send the received data to the serial port) after lines 404 (ht-tp version) and 457 (ht-tps version), I was trying pretty much the original app and the ht-tp version worked fine, but the ht-tps version didn't.
After having enabed debug (I also added a few additional messages in some parts of the code), I noticed the problem was in the EccVerify function of internal.c. There was a signature verification error and I thought it might be related with a CA validation problem, so I decided to manually return a 0 value (ok) so that the process could continue.
As a result, the negotiation finishes successfully (SSL Connection Opened: Starting Clear Text Communication in the attached log file, from line 426 of app.c) but right after the application data is sent, I receive a handshake record instead of an application data record (I guess it's generated when I tried to extract data from the socket using NET_PRES_SocketRead, line 457 of app.c). The output in the log file is this:
User calling wolfSSL_read in error state, not allowed
What am I missing here? Other than ignoring the signature validation, I'm using the original app and actually the negotiation seems to work fine.
Regards