Merge pull request #1910 from embhorn/zd4324

Handle incomplete shutdown
This commit is contained in:
David Garske
2018-11-06 05:19:58 -08:00
committed by GitHub

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;
}
}
}