NAME
SSLsetshutdown, SSLgetshutdown - manipulate shutdown state of an
SSL connectionSYNOPSIS
#include
void SSLsetshutdown(SSL *ssl, int mode); int SSLgetshutdown(const SSL *ssl);DESCRIPTION
SSLsetshutdown() sets the shutdown state of ssssll to mmooddee. SSLgetshutdown() returns the shutdown mode of ssssll. NNOOTTEESS The shutdown state of an ssl connection is a bitmask of: 0 No shutdown setting, yet. SSLSENTSHUTDOWN A "close notify" shutdown alert was sent to the peer, the connection is being considered closed and the session is closed and correct. SSLRECEIVEDSHUTDOWN A shutdown alert was received form the peer, either a normal "close notify" or a fatal error. SSLSENTSHUTDOWN and SSLRECEIVEDSHUTDOWN can be set at the same time. The shutdown state of the connection is used to determine the state of the ssl session. If the session is still open, when SSLclear(3) or SSLfree(3) is called, it is considered bad and removed according to RFC2246. The actual condition for a correctly closed session is SSLSENTSHUTDOWN (according to the TLS RFC, it is acceptable to only send the "close notify" alert but to not wait for the peer's answer, when the underlying connection is closed). SSLsetshutdown() can be used to set this state without sending a close alert to the peer (see SSLshutdown(3)). If a "close notify" was received, SSLRECEIVEDSHUTDOWN will be set, for setting SSLSENTSHUTDOWN the application must however still call SSLshutdown(3) or SSLsetshutdown() itself.RETURN VALUES
SSLsetshutdown() does not return diagnostic information. SSLgetshutdown() returns the current setting.SEE ALSO
ssl(3), SSLshutdown(3), SSLCTXsetquietshutdown(3), SSLclear(3), SSLfree(3)0.9.7l 2005-03-30 SSLsetshutdown(3)