forked from wolfSSL/wolfssl
Add fix
This commit is contained in:
@ -2947,7 +2947,7 @@ int wolfSSL_shutdown(WOLFSSL* ssl)
|
|||||||
|
|
||||||
/* call wolfSSL_shutdown again for bidirectional shutdown */
|
/* call wolfSSL_shutdown again for bidirectional shutdown */
|
||||||
if (ssl->options.sentNotify && !ssl->options.closeNotify) {
|
if (ssl->options.sentNotify && !ssl->options.closeNotify) {
|
||||||
ret = wolfSSL_read(ssl, &tmp, 0);
|
ret = wolfSSL_read(ssl, &tmp, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
WOLFSSL_ERROR(ssl->error);
|
WOLFSSL_ERROR(ssl->error);
|
||||||
ret = WOLFSSL_FATAL_ERROR;
|
ret = WOLFSSL_FATAL_ERROR;
|
||||||
@ -2955,7 +2955,7 @@ int wolfSSL_shutdown(WOLFSSL* ssl)
|
|||||||
ssl->error = WOLFSSL_ERROR_SYSCALL; /* simulate OpenSSL behavior */
|
ssl->error = WOLFSSL_ERROR_SYSCALL; /* simulate OpenSSL behavior */
|
||||||
ret = WOLFSSL_SUCCESS;
|
ret = WOLFSSL_SUCCESS;
|
||||||
} else if ((ssl->error == WOLFSSL_ERROR_NONE) &&
|
} else if ((ssl->error == WOLFSSL_ERROR_NONE) &&
|
||||||
(ret < WOLFSSL_SUCCESS)) {
|
(ret > 0)) {
|
||||||
ret = WOLFSSL_SHUTDOWN_NOT_DONE;
|
ret = WOLFSSL_SHUTDOWN_NOT_DONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user