mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 10:23:37 +00:00
secur32: Update output buffer offset on return from schan_send() call.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
1c894ec973
commit
0a62c7bd40
|
@ -1299,7 +1299,8 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle
|
|||
SIZE_T data_size;
|
||||
SIZE_T length;
|
||||
char *data;
|
||||
int idx;
|
||||
int idx, output_buffer_idx = -1;
|
||||
ULONG output_offset = 0;
|
||||
|
||||
TRACE("context_handle %p, quality %ld, message %p, message_seq_no %ld\n",
|
||||
context_handle, quality, message, message_seq_no);
|
||||
|
@ -1326,8 +1327,13 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle
|
|||
params.output = message;
|
||||
params.buffer = data;
|
||||
params.length = &length;
|
||||
params.output_buffer_idx = &output_buffer_idx;
|
||||
params.output_offset = &output_offset;
|
||||
status = GNUTLS_CALL( send, ¶ms );
|
||||
|
||||
if (!status && output_buffer_idx != -1)
|
||||
message->pBuffers[output_buffer_idx].cbBuffer = output_offset;
|
||||
|
||||
TRACE("Sent %Id bytes.\n", length);
|
||||
|
||||
if (length != data_size)
|
||||
|
|
|
@ -878,7 +878,8 @@ static NTSTATUS schan_send( void *args )
|
|||
}
|
||||
}
|
||||
|
||||
t->out.desc->pBuffers[t->out.current_buffer_idx].cbBuffer = t->out.offset;
|
||||
*params->output_buffer_idx = t->out.current_buffer_idx;
|
||||
*params->output_offset = t->out.offset;
|
||||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,6 +167,8 @@ struct send_params
|
|||
SecBufferDesc *output;
|
||||
const void *buffer;
|
||||
SIZE_T *length;
|
||||
int *output_buffer_idx;
|
||||
ULONG *output_offset;
|
||||
};
|
||||
|
||||
struct set_application_protocols_params
|
||||
|
|
Loading…
Reference in a new issue