mirror of https://github.com/wolfSSL/wolfssl.git
Make get_shutdown return correct results with stunnel
parent
28cbe7e7a5
commit
e49b12c7cc
11
src/ssl.c
11
src/ssl.c
|
@ -9952,13 +9952,10 @@ void wolfSSL_set_connect_state(WOLFSSL* ssl)
|
||||||
int wolfSSL_get_shutdown(const WOLFSSL* ssl)
|
int wolfSSL_get_shutdown(const WOLFSSL* ssl)
|
||||||
{
|
{
|
||||||
WOLFSSL_ENTER("wolfSSL_get_shutdown");
|
WOLFSSL_ENTER("wolfSSL_get_shutdown");
|
||||||
#ifdef HAVE_STUNNEL
|
/* in OpenSSL, SSL_SENT_SHUTDOWN = 1, when closeNotifySent *
|
||||||
return (ssl->options.sentNotify << 1) | (ssl->options.closeNotify);
|
* SSL_RECEIVED_SHUTDOWN = 2, from close notify or fatal err */
|
||||||
#else
|
return ((ssl->options.closeNotify||ssl->options.connReset) << 1)
|
||||||
return (ssl->options.isClosed ||
|
| (ssl->options.sentNotify);
|
||||||
ssl->options.connReset ||
|
|
||||||
ssl->options.sentNotify);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue