Just to confirm, have you compared the certificate message and verified the messages are the same, or the actual certificate that you load and think you send?
I verified the bytes that were in the failing certificate and the passing certificate were the same certificate bytes.
I am currently using mbedtls 2.7.13, I also tried 2.16.4 with the same results.
Again the root problem is that I think these certificates failures are preventing file transfers.
Here is a link to the Wireshark capture file:
https://drive.google.com/open?id=1y5d6-DOa2hQaXlfBiIGHTho_iK2Rz6Bu
Here is some debug log from my server, if it helps.
79361: altcp_tcp.c 110: RX 517 bytes, port 63162
679371: ssl_srv.c 735: candidate certificate chain, certificate
679379: ssl_srv.c 797: selected certificate chain, certificate
679387: ssl_srv.c 2547: server hello, session id len.: 32
679395: ssl_srv.c 2636: write server hello 87 bytes
679402: altcp_tcp.c 367: write 92, port 63162
679408: ssl_tls.c 4457: own certificate
679416: altcp_tcp.c 367: write 311, port 63162
680064: ssl_srv.c 3067: N is 69 bytes
680070: ssl_srv.c 3205: N is 71 bytes
680778: ssl_srv.c 3216: signature_len is 70 bytes
680784: ssl_srv.c 3217: hashlen is 0 bytes
680790: ssl_srv.c 3225: N is 143 bytes
680796: altcp_tcp.c 367: write 152, port 63162
680802: ssl_srv.c 3246: write server key exchange, 147 bytes
680810: altcp_tcp.c 367: write 19, port 63162
680816: altcp_tcp.c 367: write 9, port 63162
680822: WARNING: altcp_tcp.c 257: REceived 517,63162
680831: altcp_tcp.c 110: RX 517 bytes, port 63163
680841: ssl_srv.c 735: candidate certificate chain, certificate
680849: ssl_srv.c 797: selected certificate chain, certificate
680857: ssl_srv.c 2547: server hello, session id len.: 32
680864: ssl_srv.c 2636: write server hello 87 bytes
680872: altcp_tcp.c 367: write 92, port 63163
680878: ssl_tls.c 4457: own certificate
680885: altcp_tcp.c 367: write 311, port 63163
681533: ssl_srv.c 3067: N is 69 bytes
681539: ssl_srv.c 3205: N is 71 bytes
682250: ssl_srv.c 3216: signature_len is 72 bytes
682256: ssl_srv.c 3217: hashlen is 0 bytes
682262: ssl_srv.c 3225: N is 145 bytes
682268: altcp_tcp.c 367: write 154, port 63163
682274: ssl_srv.c 3246: write server key exchange, 149 bytes
682282: altcp_tcp.c 367: write 19, port 63163
682288: altcp_tcp.c 367: write 9, port 63163
682294: WARNING: altcp_tcp.c 257: REceived 517,63163
682361: altcp_tcp.c 128: TX 583 bytes, port 63162
682367: altcp_tcp.c 110: RX 7 bytes, port 63162
682374: WARNING: ssl_tls.c 4253: got an alert message, type: [2:46]
682382: ERROR: ssl_tls.c 4263: is a fatal alert message (msg 46)
682390: WARNING: altcp_tcp.c 257: REceived 7,63162
682397: ERROR: altcp_tls_mbedtls.c 287: mbedtls_ssl_handshake failed: -0x7780, port 63162
682606: altcp_tcp.c 128: TX 585 bytes, port 63163
682612: altcp_tcp.c 110: RX 7 bytes, port 63163
682619: WARNING: ssl_tls.c 4253: got an alert message, type: [2:46]
682627: ERROR: ssl_tls.c 4263: is a fatal alert message (msg 46)
682635: WARNING: altcp_tcp.c 257: REceived 7,63163
682642: ERROR: altcp_tls_mbedtls.c 287: mbedtls_ssl_handshake failed: -0x7780, port 63163
682883: altcp_tcp.c 110: RX 517 bytes, port 63168
682892: ssl_srv.c 735: candidate certificate chain, certificate
682900: ssl_srv.c 797: selected certificate chain, certificate
682909: ssl_srv.c 2547: server hello, session id len.: 32
682916: ssl_srv.c 2636: write server hello 87 bytes
682923: altcp_tcp.c 367: write 92, port 63168
682929: ssl_tls.c 4457: own certificate
682937: altcp_tcp.c 367: write 311, port 63168
683588: ssl_srv.c 3067: N is 69 bytes
683593: ssl_srv.c 3205: N is 71 bytes
684305: ssl_srv.c 3216: signature_len is 72 bytes
684311: ssl_srv.c 3217: hashlen is 0 bytes
684317: ssl_srv.c 3225: N is 145 bytes
684323: altcp_tcp.c 367: write 154, port 63168
684329: ssl_srv.c 3246: write server key exchange, 149 bytes
684337: altcp_tcp.c 367: write 19, port 63168
684343: altcp_tcp.c 367: write 9, port 63168
684349: WARNING: altcp_tcp.c 257: REceived 517,63168
684667: altcp_tcp.c 128: TX 585 bytes, port 63168
684674: altcp_tcp.c 110: RX 138 bytes, port 63168
684680: ERROR: ssl_tls.c 4605: TLSv1 client has no certificate
685358: altcp_tcp.c 367: write 6, port 63168
685367: altcp_tcp.c 367: write 45, port 63168
685373: WARNING: altcp_tcp.c 257: REceived 138,63168
685382: altcp_tcp.c 110: RX 517 bytes, port 63167
685391: ssl_srv.c 735: candidate certificate chain, certificate
685399: ssl_srv.c 797: selected certificate chain, certificate
685408: ssl_srv.c 2547: server hello, session id len.: 32
685415: ssl_srv.c 2636: write server hello 87 bytes
685422: altcp_tcp.c 367: write 92, port 63167
685428: ssl_tls.c 4457: own certificate
685436: altcp_tcp.c 367: write 311, port 63167
686086: ssl_srv.c 3067: N is 69 bytes
686092: ssl_srv.c 3205: N is 71 bytes
686804: ssl_srv.c 3216: signature_len is 71 bytes
686810: ssl_srv.c 3217: hashlen is 0 bytes
686816: ssl_srv.c 3225: N is 144 bytes
686822: altcp_tcp.c 367: write 153, port 63167
686829: ssl_srv.c 3246: write server key exchange, 148 bytes
686836: altcp_tcp.c 367: write 19, port 63167
686843: altcp_tcp.c 367: write 9, port 63167
686849: WARNING: altcp_tcp.c 257: REceived 517,63167
687254: altcp_tcp.c 128: TX 51 bytes, port 63168
687260: altcp_tcp.c 110: RX 570 bytes, port 63168
687269: WARNING: altcp_tcp.c 257: REceived 29,63168
687276: altcp_tls_mbedtls.c 1054: Received 541, port 63168
687283: WARNING: altcp_tcp.c 257: REceived 541,63168
687291: httpd.c 2434: Opening /dashboard.html
687299: fs.cpp 92: reading SD /dashboard.html: 2920, 18732
687324: altcp_tcp.c 367: write 2949, port 63168
687465: altcp_tcp.c 128: TX 2920 bytes, port 63168
687472: fs.cpp 92: reading SD /dashboard.html: 2920, 15812
687498: altcp_tcp.c 367: write 2949, port 63168
687519: altcp_tcp.c 128: TX 2920 bytes, port 63168
687525: fs.cpp 92: reading SD /dashboard.html: 2920, 12892
687552: altcp_tcp.c 367: write 2949, port 63168
687698: altcp_tcp.c 128: TX 2920 bytes, port 63168
687704: fs.cpp 92: reading SD /dashboard.html: 2920, 9972
687730: altcp_tcp.c 367: write 2949, port 63168
687738: altcp_tcp.c 128: TX 2920 bytes, port 63168
687744: fs.cpp 92: reading SD /dashboard.html: 2920, 7052
687771: altcp_tcp.c 367: write 2949, port 63168
687866: altcp_tcp.c 128: TX 2920 bytes, port 63168
687873: fs.cpp 92: reading SD /dashboard.html: 2920, 4132
687899: altcp_tcp.c 367: write 2949, port 63168
687910: altcp_tcp.c 128: TX 2920 bytes, port 63168
687916: fs.cpp 92: reading SD /dashboard.html: 1212, 1212
687933: altcp_tcp.c 367: write 1241, port 63168
687940: httpd.c 1713: end of file /dashboard.html
687946: WARNING: httpd.c 644: Closing connection, 63168
687959: altcp_tcp.c 110: RX 517 bytes, port 63173
687969: ssl_srv.c 735: candidate certificate chain, certificate
687977: ssl_srv.c 797: selected certificate chain, certificate
687985: ssl_srv.c 2547: server hello, session id len.: 32
687992: ssl_srv.c 2636: write server hello 87 bytes
687999: altcp_tcp.c 367: write 92, port 63173
688005: ssl_tls.c 4457: own certificate
688013: altcp_tcp.c 367: write 311, port 63173
688661: ssl_srv.c 3067: N is 69 bytes
688667: ssl_srv.c 3205: N is 71 bytes
689380: ssl_srv.c 3216: signature_len is 72 bytes
689386: ssl_srv.c 3217: hashlen is 0 bytes
689392: ssl_srv.c 3225: N is 145 bytes
689398: altcp_tcp.c 367: write 154, port 63173
689405: ssl_srv.c 3246: write server key exchange, 149 bytes
689412: altcp_tcp.c 367: write 19, port 63173
689418: altcp_tcp.c 367: write 9, port 63173
689424: WARNING: altcp_tcp.c 257: REceived 517,63173
689732: altcp_tcp.c 128: TX 585 bytes, port 63173
689739: altcp_tcp.c 110: RX 7 bytes, port 63173
689745: WARNING: ssl_tls.c 4253: got an alert message, type: [2:46]
689753: ERROR: ssl_tls.c 4263: is a fatal alert message (msg 46)
689761: WARNING: altcp_tcp.c 257: REceived 7,63173
689768: ERROR: altcp_tls_mbedtls.c 287: mbedtls_ssl_handshake failed: -0x7780, port 63173
689972: altcp_tcp.c 110: RX 517 bytes, port 63179
689981: ssl_srv.c 735: candidate certificate chain, certificate
689989: ssl_srv.c 797: selected certificate chain, certificate
689998: ssl_srv.c 2547: server hello, session id len.: 32
690005: ssl_srv.c 2636: write server hello 87 bytes
690012: altcp_tcp.c 367: write 92, port 63179
690018: ssl_tls.c 4457: own certificate
690026: altcp_tcp.c 367: write 311, port 63179
690676: ssl_srv.c 3067: N is 69 bytes
690682: ssl_srv.c 3205: N is 71 bytes
691400: ssl_srv.c 3216: signature_len is 72 bytes
691406: ssl_srv.c 3217: hashlen is 0 bytes
691412: ssl_srv.c 3225: N is 145 bytes
691418: altcp_tcp.c 367: write 154, port 63179
691424: ssl_srv.c 3246: write server key exchange, 149 bytes
691432: altcp_tcp.c 367: write 19, port 63179
691438: altcp_tcp.c 367: write 9, port 63179
691444: WARNING: altcp_tcp.c 257: REceived 517,63179
691952: altcp_tcp.c 128: TX 584 bytes, port 63167
691959: altcp_tcp.c 128: TX 585 bytes, port 63179
691965: altcp_tcp.c 110: RX 7 bytes, port 63179
691972: WARNING: ssl_tls.c 4253: got an alert message, type: [2:46]
691980: ERROR: ssl_tls.c 4263: is a fatal alert message (msg 46)
691988: WARNING: altcp_tcp.c 257: REceived 7,63179
691995: ERROR: altcp_tls_mbedtls.c 287: mbedtls_ssl_handshake failed: -0x7780, port 63179
692455: altcp_tcp.c 110: RX 517 bytes, port 63182
692465: ssl_srv.c 735: candidate certificate chain, certificate
692473: ssl_srv.c 797: selected certificate chain, certificate
692481: ssl_srv.c 2547: server hello, session id len.: 32
692488: ssl_srv.c 2636: write server hello 87 bytes
692495: altcp_tcp.c 367: write 92, port 63182
692501: ssl_tls.c 4457: own certificate
692509: altcp_tcp.c 367: write 311, port 63182
693158: ssl_srv.c 3067: N is 69 bytes
693164: ssl_srv.c 3205: N is 71 bytes
693879: ssl_srv.c 3216: signature_len is 71 bytes
693885: ssl_srv.c 3217: hashlen is 0 bytes
693891: ssl_srv.c 3225: N is 144 bytes
693897: altcp_tcp.c 367
Thanks
Trampas