I will use materials from here for it helps to clarify the question.
The image below represents a SSL session flow
The description for step 7
states:
When either the client or the server is ready to end the connection, both the client and the server issue the SSL_shutdown() function to indicate that the SSL connection is ending normally. This causes an SSL record whose type is alert to flow. For this, the type of alert is close notify, which means the SSL session is ending.
Given that the server is just and echo server with SSL that has a while(1)
inside which it reads and writes the same back to the client.
What openSSL command needs to be run on the server so that it understands that the client sent a close notify
and that it isn't just some message it should echo?
In the quote how does one express both the client and the server issue the SSL_shutdown()
with code? Would expect either one to send a close notify
and the other to respond as a reaction to it.
close_notify
manifests itself to the recipient as end of stream when reading, same as read()
returning 0 on a C plaintext socket.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With