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
5004c38d
Commit
5004c38d
authored
Oct 03, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Return failure if chan_EncryptMessage() can't encrypt the entire buffer.
parent
09038554
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
schannel.c
dlls/secur32/schannel.c
+10
-17
No files found.
dlls/secur32/schannel.c
View file @
5004c38d
...
...
@@ -925,10 +925,11 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle
struct
schan_transport
transport
;
struct
schan_context
*
ctx
;
struct
schan_buffers
*
b
;
SECURITY_STATUS
status
;
SecBuffer
*
buffer
;
SIZE_T
data_size
;
SIZE_T
length
;
char
*
data
;
SSIZE_T
sent
=
0
;
int
idx
;
TRACE
(
"context_handle %p, quality %d, message %p, message_seq_no %d
\n
"
,
...
...
@@ -959,29 +960,21 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle
init_schan_buffers
(
&
transport
.
out
,
message
,
schan_encrypt_message_get_next_buffer_token
);
schan_imp_set_session_transport
(
ctx
->
session
,
&
transport
);
while
(
sent
<
data_size
)
{
SIZE_T
length
=
data_size
-
sent
;
SECURITY_STATUS
status
=
schan_imp_send
(
ctx
->
session
,
data
+
sent
,
&
length
);
if
(
status
==
SEC_I_CONTINUE_NEEDED
)
break
;
else
if
(
status
!=
SEC_E_OK
)
{
HeapFree
(
GetProcessHeap
(),
0
,
data
);
ERR
(
"Returning %d
\n
"
,
status
);
return
status
;
}
length
=
data_size
;
status
=
schan_imp_send
(
ctx
->
session
,
data
,
&
length
);
sent
+=
length
;
}
TRACE
(
"Sent %ld bytes.
\n
"
,
length
);
TRACE
(
"Sent %ld bytes
\n
"
,
sent
);
if
(
length
!=
data_size
)
status
=
SEC_E_INTERNAL_ERROR
;
b
=
&
transport
.
out
;
b
->
desc
->
pBuffers
[
b
->
current_buffer_idx
].
cbBuffer
=
b
->
offset
;
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
SEC_E_OK
;
TRACE
(
"Returning %#x.
\n
"
,
status
);
return
status
;
}
static
int
schan_decrypt_message_get_next_buffer
(
const
struct
schan_transport
*
t
,
struct
schan_buffers
*
s
)
...
...
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