Format
LIBS := CSSL
#include <openssl/ssl.h>
int SSL_shutdown(SSL *ssl)
ssl
A pointer to a token returned on the SSL_new call.
Normal return
Return code 0 indicates that the application issued the SSL_shutdown function first. Continue issuing the SSL_shutdown function until you receive return code 1, which indicates the remote application has also shut down.
In SSL version 3 and TLS version 1, return code 1 indicates that both the client and server applications have issued the SSL_shutdown function.
In SSL version 2, a return code of 1 is always returned.
Error return
A return code equal to -1 indicates an error. Issue the SSL_get_error function to obtain specific information about the error.
Programming considerations
To use this function, you must include the library specified in the prototype in your makefile.
The SSL_shutdown function is the normal way to shut down an SSL session. It is a good idea that you shut down an SSL session before the socket is shut down and closed.
An alert is sent to the remote partner to notify it that the connection is ending normally. Normal shutdown is required if you want to resume the session across a different SSLsocket at a later time.
Both the client and server
SSL_shutdown返回值的研究(1)
最新推荐文章于 2024-03-26 11:59:18 发布