Topic: BUFFER_ERROR (-328) after TLS1.3 client_hello message

Hello all,
I'll take a moment to explain the context of use:
- I'm using the wolfSSL library C# wrapper to develop a TLS1.3 client.
- The client communicates with the server (a ST NUCLEOH743ZI2 board) throught UART serial port.
- I've just created two working clients running on linux distribution and cygwin.

Using the C# wrapper on VisualStudio I've encuntered the following problem:
When starting handshake procedure with the server the client sends the following client_hello packet:

16 03 03 01 1a 01 00 01 16 03 03 0e 44 d6 b2 0c 60 b4 44 99 66 3f 2e fc a3 a7 8d 4c d8
3b 84 04 c1 2b a8 27 1d 2d 04 f7 ff 85 ad 00 00 58 13 01 13 02 c0 2c c0 2b c0 30 c0 2f
00 9f 00 9e 00 9d 00 9c c0 2e c0 2d c0 32 c0 31 c0 27 c0 23 c0 29 c0 25 c0 28 c0 24 c0
2a c0 26 c0 0a c0 05 c0 09 c0 04 c0 08 c0 03 c0 14 c0 0f c0 13 c0 0e c0 12 c0 0d 00 6b
00 67 00 39 00 33 00 16 00 3d 00 3c 00 35 00 2f 00 0a 01 00 00 95 00 2d 00 03 02 00 01
00 33 00 47 00 45 00 17 00 41 04 c7 94 90 f9 78 a4 e0 f5 48 d7 63 cd 1e e5 fb 87 ea 33
5a 80 e2 d5 49 23 94 8d eb df 39 2d 76 a2 d1 c9 0b b0 32 5b 01 59 dc 7e 77 ab 8a 83 19
49 15 62 96 b6 e1 37 0e d5 c6 da 93 d8 3d 17 58 fa 00 2b 00 03 02 03 04 00 0d 00 1e 00
1c 06 03 05 03 04 03 02 03 08 06 08 0b 08 05 08 0a 08 04 08 09 06 01 05 01 04 01 02 01
00 0a 00 12 00 10 00 19 00 1c 00 18 00 1b 00 17 00 1a 00 15 01 00 00 16 00 00

The server answers with:

15 03 03 00 02 02 32

And error -328 BUFFER_ERROR is raised, the client reports -313 FATAL_ERROR.
I've also double checked that data sent by client are received by the server.

Can you help me?
Thank you,

Mattia

Share

Re: BUFFER_ERROR (-328) after TLS1.3 client_hello message

Hello Mattia,

Thank you for reaching out to us here at wolfSSL.  I will need some time to analyze the handshake data that you have shown.  It might be more efficient if you could turn on debugging (define WOLFSSL_DEBUG and call wolfSSL_Debugging_ON() ) on both sides and paste the logs in a message here.

Warm regards, Anthony

Share

Re: BUFFER_ERROR (-328) after TLS1.3 client_hello message

Hello Again Mattia,

I have successfully imported your ClientHello into wireshark.  It looks to be a compliant TLS 1.3 client hello handshake message.  I see no problems with it.  But then the server sends a DECODE_ERROR alert message. Can you please confirm that the server received the same client hello that you pasted above? I suspect that there is some sort of I/O mishap here.

Warm regards, Anthony

Share

Re: BUFFER_ERROR (-328) after TLS1.3 client_hello message

Mattia,

The easiest way to confirm my theory is to define WOLFSSL_DEBUG_TLS to see what the server gets.

Warm regards, Anthony

Share