Handle incomplete shutdown

This commit is contained in:
Eric Blankenhorn
2018-11-02 13:50:53 -05:00
parent 1ffc1108a6
commit d61ae3a02a

View File

@@ -2563,6 +2563,9 @@ int wolfSSL_shutdown(WOLFSSL* ssl)
} else if (ssl->options.closeNotify) {
ssl->error = WOLFSSL_ERROR_SYSCALL; /* simulate OpenSSL behavior */
ret = WOLFSSL_SUCCESS;
} else if ((ssl->error == WOLFSSL_ERROR_NONE) &&
(ret < WOLFSSL_SUCCESS)) {
ret = WOLFSSL_SHUTDOWN_NOT_DONE;
}
}
}