OpenSSL SSL_shutdown(3openssl)
NNNNAAAAMMMMEEEESSL_shutdown - shut down a TLS/SSL connection
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS#include
int SSL_shutdown(SSL *ssl);
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSL_shutdown() shuts down an active TLS/SSL connection. It
sends the "close notify" shutdown alert to the peer. NNNNOOOOTTTTEEEESSSSSSL_shutdown() tries to send the "close notify" shutdown
alert to the peer. Whether the operation succeeds or not,the SSL_SENT_SHUTDOWN flag is set and a currently open
session is considered closed and good and will be kept in the session cache for further reuse. The shutdown procedure consists of 2 steps: the sending of the "close notify" shutdown alert and the reception of the peer's "close notify" shutdown alert. According to the TLS standard, it is acceptable for an application to only send its shutdown alert and then close the underlying connection without waiting for the peer's response (this way resources can be saved, as the process can already terminate or serve another connection). When the underlying connection shall be used for more communications, the complete shutdown procedure (bidirectional "close notify" alerts) must be performed, so that the peers stay synchronized.SSL_shutdown() supports both uni- and bidirectional shutdown
by its 2 step behaviour.14/Nov/2004 Last change: 0.9.8o 1