[PATCH 5/5] secur32: Return STREAM_HEADER/TRAILER buffers on SEC_I_RENEGOTIATE.
Rémi Bernon
rbernon at codeweavers.com
Mon Feb 15 05:47:23 CST 2021
And don't print an error anymore.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/secur32/schannel.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 07d3ea5216a..272cb6dabd6 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -1338,6 +1338,7 @@ static void schan_decrypt_fill_buffer(PSecBufferDesc message, ULONG buffer_type,
static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle,
PSecBufferDesc message, ULONG message_seq_no, PULONG quality)
{
+ SECURITY_STATUS status = SEC_E_OK;
struct schan_context *ctx;
SecBuffer *buffer;
SIZE_T data_size;
@@ -1387,10 +1388,16 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
while (received < data_size)
{
SIZE_T length = data_size - received;
- SECURITY_STATUS status = schan_imp_recv(ctx->session, data + received, &length);
+ status = schan_imp_recv(ctx->session, data + received, &length);
+
+ if (status == SEC_I_RENEGOTIATE)
+ break;
if (status == SEC_I_CONTINUE_NEEDED)
+ {
+ status = SEC_E_OK;
break;
+ }
if (status != SEC_E_OK)
{
@@ -1423,7 +1430,7 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
buffer->BufferType = SECBUFFER_STREAM_HEADER;
buffer->cbBuffer = 5;
- return SEC_E_OK;
+ return status;
}
static SECURITY_STATUS SEC_ENTRY schan_DeleteSecurityContext(PCtxtHandle context_handle)
--
2.30.0
More information about the wine-devel
mailing list