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
65aed972
Commit
65aed972
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: Properly handle GNUTLS_E_AGAIN in (GnuTLS) schan_imp_send().
parent
5004c38d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
19 deletions
+34
-19
schannel.c
dlls/secur32/schannel.c
+1
-18
schannel_gnutls.c
dlls/secur32/schannel_gnutls.c
+15
-1
secur32_priv.h
dlls/secur32/secur32_priv.h
+18
-0
No files found.
dlls/secur32/schannel.c
View file @
65aed972
...
...
@@ -62,23 +62,6 @@ struct schan_context
ULONG
req_ctx_attr
;
};
struct
schan_buffers
{
SIZE_T
offset
;
SIZE_T
limit
;
const
SecBufferDesc
*
desc
;
int
current_buffer_idx
;
BOOL
allow_buffer_resize
;
int
(
*
get_next_buffer
)(
const
struct
schan_transport
*
,
struct
schan_buffers
*
);
};
struct
schan_transport
{
struct
schan_context
*
ctx
;
struct
schan_buffers
in
;
struct
schan_buffers
out
;
};
static
struct
schan_handle
*
schan_handle_table
;
static
struct
schan_handle
*
schan_free_handles
;
static
SIZE_T
schan_handle_table_size
;
...
...
@@ -496,7 +479,7 @@ static void schan_resize_current_buffer(const struct schan_buffers *s, SIZE_T mi
b
->
pvBuffer
=
new_data
;
}
static
char
*
schan_get_buffer
(
const
struct
schan_transport
*
t
,
struct
schan_buffers
*
s
,
SIZE_T
*
count
)
char
*
schan_get_buffer
(
const
struct
schan_transport
*
t
,
struct
schan_buffers
*
s
,
SIZE_T
*
count
)
{
SIZE_T
max_count
;
PSecBuffer
buffer
;
...
...
dlls/secur32/schannel_gnutls.c
View file @
65aed972
...
...
@@ -65,6 +65,7 @@ MAKE_FUNCPTR(gnutls_set_default_priority);
MAKE_FUNCPTR
(
gnutls_record_get_max_size
);
MAKE_FUNCPTR
(
gnutls_record_recv
);
MAKE_FUNCPTR
(
gnutls_record_send
);
MAKE_FUNCPTR
(
gnutls_transport_get_ptr
);
MAKE_FUNCPTR
(
gnutls_transport_set_errno
);
MAKE_FUNCPTR
(
gnutls_transport_set_ptr
);
MAKE_FUNCPTR
(
gnutls_transport_set_pull_function
);
...
...
@@ -340,11 +341,23 @@ SECURITY_STATUS schan_imp_send(schan_imp_session session, const void *buffer,
SIZE_T
*
length
)
{
gnutls_session_t
s
=
(
gnutls_session_t
)
session
;
ssize_t
ret
=
pgnutls_record_send
(
s
,
buffer
,
*
length
);
ssize_t
ret
;
again:
ret
=
pgnutls_record_send
(
s
,
buffer
,
*
length
);
if
(
ret
>=
0
)
*
length
=
ret
;
else
if
(
ret
==
GNUTLS_E_AGAIN
)
{
struct
schan_transport
*
t
=
(
struct
schan_transport
*
)
pgnutls_transport_get_ptr
(
s
);
SIZE_T
count
=
0
;
if
(
schan_get_buffer
(
t
,
&
t
->
out
,
&
count
))
goto
again
;
return
SEC_I_CONTINUE_NEEDED
;
}
else
{
pgnutls_perror
(
ret
);
...
...
@@ -432,6 +445,7 @@ BOOL schan_imp_init(void)
LOAD_FUNCPTR
(
gnutls_record_get_max_size
);
LOAD_FUNCPTR
(
gnutls_record_recv
);
LOAD_FUNCPTR
(
gnutls_record_send
);
LOAD_FUNCPTR
(
gnutls_transport_get_ptr
)
LOAD_FUNCPTR
(
gnutls_transport_set_errno
)
LOAD_FUNCPTR
(
gnutls_transport_set_ptr
)
LOAD_FUNCPTR
(
gnutls_transport_set_pull_function
)
...
...
dlls/secur32/secur32_priv.h
View file @
65aed972
...
...
@@ -183,6 +183,24 @@ typedef struct schan_imp_certificate_credentials_opaque *schan_imp_certificate_c
struct
schan_transport
;
struct
schan_buffers
{
SIZE_T
offset
;
SIZE_T
limit
;
const
SecBufferDesc
*
desc
;
int
current_buffer_idx
;
BOOL
allow_buffer_resize
;
int
(
*
get_next_buffer
)(
const
struct
schan_transport
*
,
struct
schan_buffers
*
);
};
struct
schan_transport
{
struct
schan_context
*
ctx
;
struct
schan_buffers
in
;
struct
schan_buffers
out
;
};
char
*
schan_get_buffer
(
const
struct
schan_transport
*
t
,
struct
schan_buffers
*
s
,
SIZE_T
*
count
)
DECLSPEC_HIDDEN
;
extern
int
schan_pull
(
struct
schan_transport
*
t
,
void
*
buff
,
size_t
*
buff_len
)
DECLSPEC_HIDDEN
;
extern
int
schan_push
(
struct
schan_transport
*
t
,
const
void
*
buff
,
size_t
*
buff_len
)
DECLSPEC_HIDDEN
;
...
...
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