Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
149ffe13
Commit
149ffe13
authored
Sep 15, 2010
by
Mikko Rasa
Committed by
Alexandre Julliard
Sep 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Fill header and trailer buffers in schan_DecryptMessage.
parent
b424b343
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
schannel.c
dlls/secur32/schannel.c
+25
-2
No files found.
dlls/secur32/schannel.c
View file @
149ffe13
...
@@ -1187,6 +1187,19 @@ static int schan_validate_decrypt_buffer_desc(PSecBufferDesc message)
...
@@ -1187,6 +1187,19 @@ static int schan_validate_decrypt_buffer_desc(PSecBufferDesc message)
return
data_idx
;
return
data_idx
;
}
}
static
void
schan_decrypt_fill_buffer
(
PSecBufferDesc
message
,
ULONG
buffer_type
,
void
*
data
,
ULONG
size
)
{
int
idx
;
SecBuffer
*
buffer
;
idx
=
schan_find_sec_buffer_idx
(
message
,
0
,
SECBUFFER_EMPTY
);
buffer
=
&
message
->
pBuffers
[
idx
];
buffer
->
BufferType
=
buffer_type
;
buffer
->
pvBuffer
=
data
;
buffer
->
cbBuffer
=
size
;
}
static
SECURITY_STATUS
SEC_ENTRY
schan_DecryptMessage
(
PCtxtHandle
context_handle
,
static
SECURITY_STATUS
SEC_ENTRY
schan_DecryptMessage
(
PCtxtHandle
context_handle
,
PSecBufferDesc
message
,
ULONG
message_seq_no
,
PULONG
quality
)
PSecBufferDesc
message
,
ULONG
message_seq_no
,
PULONG
quality
)
{
{
...
@@ -1198,6 +1211,7 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
...
@@ -1198,6 +1211,7 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
ssize_t
received
=
0
;
ssize_t
received
=
0
;
ssize_t
ret
;
ssize_t
ret
;
int
idx
;
int
idx
;
char
*
buf_ptr
;
TRACE
(
"context_handle %p, message %p, message_seq_no %d, quality %p
\n
"
,
TRACE
(
"context_handle %p, message %p, message_seq_no %d, quality %p
\n
"
,
context_handle
,
message
,
message_seq_no
,
quality
);
context_handle
,
message
,
message_seq_no
,
quality
);
...
@@ -1252,10 +1266,19 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
...
@@ -1252,10 +1266,19 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
TRACE
(
"Received %zd bytes
\n
"
,
received
);
TRACE
(
"Received %zd bytes
\n
"
,
received
);
memcpy
(
buffer
->
pvBuffer
,
data
,
received
)
;
buf_ptr
=
buffer
->
pvBuffer
;
buffer
->
cbBuffer
=
received
;
memcpy
(
buf_ptr
+
5
,
data
,
received
)
;
HeapFree
(
GetProcessHeap
(),
0
,
data
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
schan_decrypt_fill_buffer
(
message
,
SECBUFFER_DATA
,
buf_ptr
+
5
,
received
);
schan_decrypt_fill_buffer
(
message
,
SECBUFFER_STREAM_TRAILER
,
buf_ptr
+
5
+
received
,
buffer
->
cbBuffer
-
5
-
received
);
buffer
->
BufferType
=
SECBUFFER_STREAM_HEADER
;
buffer
->
cbBuffer
=
5
;
return
SEC_E_OK
;
return
SEC_E_OK
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment