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
179ee89e
Commit
179ee89e
authored
Dec 07, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Use VERS-ALL priority string only on recent gnutls versions.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9dd0f8f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
schannel_gnutls.c
dlls/secur32/schannel_gnutls.c
+21
-4
No files found.
dlls/secur32/schannel_gnutls.c
View file @
179ee89e
...
...
@@ -199,7 +199,8 @@ DWORD schan_imp_enabled_protocols(void)
BOOL
schan_imp_create_session
(
schan_imp_session
*
session
,
schan_credentials
*
cred
)
{
gnutls_session_t
*
s
=
(
gnutls_session_t
*
)
session
;
char
priority
[
128
]
=
"NORMAL:%LATEST_RECORD_VERSION:-VERS-ALL"
,
*
p
;
char
priority
[
128
]
=
"NORMAL:%LATEST_RECORD_VERSION"
,
*
p
;
BOOL
using_vers_all
=
FALSE
,
disabled
;
unsigned
i
;
int
err
=
pgnutls_init
(
s
,
cred
->
credential_use
==
SECPKG_CRED_INBOUND
?
GNUTLS_SERVER
:
GNUTLS_CLIENT
);
...
...
@@ -210,10 +211,26 @@ BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cre
}
p
=
priority
+
strlen
(
priority
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
protocol_priority_flags
);
i
++
)
{
if
(
!
(
cred
->
enabled_protocols
&
protocol_priority_flags
[
i
].
enable_flag
))
continue
;
/* VERS-ALL is nice to use for forward compatibility. It was introduced before support for TLS1.3,
* so if TLS1.3 is supported, we may safely use it. Otherwise explicitly disable all known
* disabled protocols. */
if
(
supported_protocols
&
SP_PROT_TLS1_3_CLIENT
)
{
strcpy
(
p
,
":-VERS-ALL"
);
p
+=
strlen
(
p
);
using_vers_all
=
TRUE
;
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
protocol_priority_flags
);
i
++
)
{
if
(
!
(
supported_protocols
&
protocol_priority_flags
[
i
].
enable_flag
))
continue
;
disabled
=
!
(
cred
->
enabled_protocols
&
protocol_priority_flags
[
i
].
enable_flag
);
if
(
using_vers_all
&&
disabled
)
continue
;
*
p
++
=
':'
;
*
p
++
=
'+'
;
*
p
++
=
disabled
?
'-'
:
'+'
;
strcpy
(
p
,
protocol_priority_flags
[
i
].
gnutls_flag
);
p
+=
strlen
(
p
);
}
...
...
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