Topic: Logging bytestream while TLS handshake is on process

We have a client and server TCP applications to perform TLS communication using WolfSSL APIs.
After we called wolfSSL_Debugging_ON() function, in console, wolfSSL is printing debug messages.
But we need the detail one level down like each message what bytestream is transmitted and received.

Eg. Handshake message is represented by 0x16 in TLS, likewise Alert protocol is 0x15 and ChangeCipherSpec is 0x14.
We want to see these details(byte streams in console)

Please help us in printing these information.

Share

Re: Logging bytestream while TLS handshake is on process

You would need to create your own logging function. The easiest place to add this logging would be at the I/O callback. You can dump out the bytes as they are read or transmit from the socket.

You can also add the data dump for the send side in the function SendBuffered(). On the receive side, you could add the logging to the function ProcessReply() right below the statement "WOLFSSL_MSG("received record layer msg");" The input buffer would have the complete message at that point.