[PATCH 1/2] secur32: Return STREAM_HEADER/TRAILER buffers on SEC_I_RENEGOTIATE.
Hans Leidekker
hans at codeweavers.com
Fri Feb 19 09:58:57 CST 2021
From: Rémi Bernon <rbernon at codeweavers.com>
And don't print an error anymore.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Hans Leidekker <hans 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 2d135a85227..d47c4d79258 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -1336,6 +1336,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;
@@ -1385,10 +1386,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)
{
@@ -1421,7 +1428,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