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
a114ce67
Commit
a114ce67
authored
Mar 10, 2021
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Add support for setting DTLS MTU.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f93284df
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
0 deletions
+34
-0
schannel.c
dlls/secur32/schannel.c
+7
-0
schannel_gnutls.c
dlls/secur32/schannel_gnutls.c
+20
-0
schannel_macosx.c
dlls/secur32/schannel_macosx.c
+6
-0
secur32_priv.h
dlls/secur32/secur32_priv.h
+1
-0
No files found.
dlls/secur32/schannel.c
View file @
a114ce67
...
...
@@ -879,6 +879,13 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
schan_imp_set_application_protocols
(
ctx
->
session
,
buffer
->
pvBuffer
,
buffer
->
cbBuffer
);
}
if
(
pInput
&&
(
idx
=
schan_find_sec_buffer_idx
(
pInput
,
0
,
SECBUFFER_DTLS_MTU
))
!=
-
1
)
{
buffer
=
&
pInput
->
pBuffers
[
idx
];
if
(
buffer
->
cbBuffer
>=
sizeof
(
WORD
))
schan_imp_set_dtls_mtu
(
ctx
->
session
,
*
(
WORD
*
)
buffer
->
pvBuffer
);
else
WARN
(
"invalid buffer size %u
\n
"
,
buffer
->
cbBuffer
);
}
phNewContext
->
dwLower
=
handle
;
phNewContext
->
dwUpper
=
0
;
}
...
...
dlls/secur32/schannel_gnutls.c
View file @
a114ce67
...
...
@@ -53,6 +53,7 @@ static int (*pgnutls_cipher_get_block_size)(gnutls_cipher_algorithm_t);
/* Not present in gnutls version < 3.0. */
static
void
(
*
pgnutls_transport_set_pull_timeout_function
)(
gnutls_session_t
,
int
(
*
)(
gnutls_transport_ptr_t
,
unsigned
int
));
static
void
(
*
pgnutls_dtls_set_mtu
)(
gnutls_session_t
,
unsigned
int
);
/* Not present in gnutls version < 3.2.0. */
static
int
(
*
pgnutls_alpn_get_selected_protocol
)(
gnutls_session_t
,
gnutls_datum_t
*
);
...
...
@@ -186,6 +187,11 @@ static int compat_gnutls_alpn_set_protocols(gnutls_session_t session, const gnut
return
GNUTLS_E_INVALID_REQUEST
;
}
static
void
compat_gnutls_dtls_set_mtu
(
gnutls_session_t
session
,
unsigned
int
mtu
)
{
FIXME
(
"
\n
"
);
}
static
ssize_t
schan_pull_adapter
(
gnutls_transport_ptr_t
transport
,
void
*
buff
,
size_t
buff_len
)
{
...
...
@@ -767,6 +773,15 @@ SECURITY_STATUS schan_imp_get_application_protocol(schan_imp_session session,
return
SEC_E_OK
;
}
SECURITY_STATUS
schan_imp_set_dtls_mtu
(
schan_imp_session
session
,
unsigned
int
mtu
)
{
gnutls_session_t
s
=
(
gnutls_session_t
)
session
;
pgnutls_dtls_set_mtu
(
s
,
mtu
);
TRACE
(
"MTU set to %u
\n
"
,
mtu
);
return
SEC_E_OK
;
}
static
WCHAR
*
get_key_container_path
(
const
CERT_CONTEXT
*
ctx
)
{
static
const
WCHAR
rsabaseW
[]
=
...
...
@@ -1130,6 +1145,11 @@ BOOL schan_imp_init(void)
WARN
(
"gnutls_alpn_get_selected_protocol not found
\n
"
);
pgnutls_alpn_get_selected_protocol
=
compat_gnutls_alpn_get_selected_protocol
;
}
if
(
!
(
pgnutls_dtls_set_mtu
=
dlsym
(
libgnutls_handle
,
"gnutls_dtls_set_mtu"
)))
{
WARN
(
"gnutls_dtls_set_mtu not found
\n
"
);
pgnutls_dtls_set_mtu
=
compat_gnutls_dtls_set_mtu
;
}
if
(
!
(
pgnutls_privkey_export_x509
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_export_x509"
)))
{
WARN
(
"gnutls_privkey_export_x509 not found
\n
"
);
...
...
dlls/secur32/schannel_macosx.c
View file @
a114ce67
...
...
@@ -1213,6 +1213,12 @@ SECURITY_STATUS schan_imp_get_application_protocol(schan_imp_session session,
return
SEC_E_UNSUPPORTED_FUNCTION
;
}
SECURITY_STATUS
schan_imp_set_dtls_mtu
(
schan_imp_session
session
,
unsigned
int
mtu
)
{
FIXME
(
"no support for setting dtls mtu on this platform
\n
"
);
return
SEC_E_UNSUPPORTED_FUNCTION
;
}
BOOL
schan_imp_init
(
void
)
{
TRACE
(
"()
\n
"
);
...
...
dlls/secur32/secur32_priv.h
View file @
a114ce67
...
...
@@ -253,5 +253,6 @@ extern void schan_imp_deinit(void) DECLSPEC_HIDDEN;
extern
void
schan_imp_set_application_protocols
(
schan_imp_session
,
unsigned
char
*
,
unsigned
int
)
DECLSPEC_HIDDEN
;
extern
SECURITY_STATUS
schan_imp_get_application_protocol
(
schan_imp_session
,
SecPkgContext_ApplicationProtocol
*
)
DECLSPEC_HIDDEN
;
extern
SECURITY_STATUS
schan_imp_set_dtls_mtu
(
schan_imp_session
,
unsigned
int
)
DECLSPEC_HIDDEN
;
#endif
/* ndef __SECUR32_PRIV_H__ */
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