Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2c44e881
Commit
2c44e881
authored
May 27, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Add explicit output parameter for create_session() request.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3ac7df1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
schannel.c
dlls/secur32/schannel.c
+1
-0
schannel_gnutls.c
dlls/secur32/schannel_gnutls.c
+13
-10
secur32_priv.h
dlls/secur32/secur32_priv.h
+1
-0
No files found.
dlls/secur32/schannel.c
View file @
2c44e881
...
...
@@ -821,6 +821,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
create_params
.
transport
=
&
ctx
->
transport
;
create_params
.
cred
=
cred
;
create_params
.
session
=
&
ctx
->
transport
.
session
;
if
(
GNUTLS_CALL
(
create_session
,
&
create_params
))
{
schan_free_handle
(
handle
,
SCHAN_HANDLE_CTX
);
...
...
dlls/secur32/schannel_gnutls.c
View file @
2c44e881
...
...
@@ -480,18 +480,20 @@ static NTSTATUS schan_create_session( void *args )
{
const
struct
create_session_params
*
params
=
args
;
schan_credentials
*
cred
=
params
->
cred
;
gnutls_session_t
*
s
=
(
gnutls_session_t
*
)
&
params
->
transport
->
session
;
char
priority
[
128
]
=
"NORMAL:%LATEST_RECORD_VERSION"
,
*
p
;
BOOL
using_vers_all
=
FALSE
,
disabled
;
unsigned
int
i
,
flags
=
(
cred
->
credential_use
==
SECPKG_CRED_INBOUND
)
?
GNUTLS_SERVER
:
GNUTLS_CLIENT
;
gnutls_session_t
s
;
int
err
;
*
params
->
session
=
0
;
if
(
cred
->
enabled_protocols
&
(
SP_PROT_DTLS1_0_CLIENT
|
SP_PROT_DTLS1_2_CLIENT
))
{
flags
|=
GNUTLS_DATAGRAM
|
GNUTLS_NONBLOCK
;
}
err
=
pgnutls_init
(
s
,
flags
);
err
=
pgnutls_init
(
&
s
,
flags
);
if
(
err
!=
GNUTLS_E_SUCCESS
)
{
pgnutls_perror
(
err
);
...
...
@@ -524,27 +526,28 @@ static NTSTATUS schan_create_session( void *args )
}
TRACE
(
"Using %s priority
\n
"
,
debugstr_a
(
priority
));
err
=
pgnutls_priority_set_direct
(
*
s
,
priority
,
NULL
);
err
=
pgnutls_priority_set_direct
(
s
,
priority
,
NULL
);
if
(
err
!=
GNUTLS_E_SUCCESS
)
{
pgnutls_perror
(
err
);
pgnutls_deinit
(
*
s
);
pgnutls_deinit
(
s
);
return
STATUS_INTERNAL_ERROR
;
}
err
=
pgnutls_credentials_set
(
*
s
,
GNUTLS_CRD_CERTIFICATE
,
err
=
pgnutls_credentials_set
(
s
,
GNUTLS_CRD_CERTIFICATE
,
(
gnutls_certificate_credentials_t
)
cred
->
credentials
);
if
(
err
!=
GNUTLS_E_SUCCESS
)
{
pgnutls_perror
(
err
);
pgnutls_deinit
(
*
s
);
pgnutls_deinit
(
s
);
return
STATUS_INTERNAL_ERROR
;
}
pgnutls_transport_set_pull_function
(
*
s
,
pull_adapter
);
if
(
flags
&
GNUTLS_DATAGRAM
)
pgnutls_transport_set_pull_timeout_function
(
*
s
,
pull_timeout
);
pgnutls_transport_set_push_function
(
*
s
,
push_adapter
);
pgnutls_transport_set_ptr
(
*
s
,
(
gnutls_transport_ptr_t
)
params
->
transport
);
pgnutls_transport_set_pull_function
(
s
,
pull_adapter
);
if
(
flags
&
GNUTLS_DATAGRAM
)
pgnutls_transport_set_pull_timeout_function
(
s
,
pull_timeout
);
pgnutls_transport_set_push_function
(
s
,
push_adapter
);
pgnutls_transport_set_ptr
(
s
,
(
gnutls_transport_ptr_t
)
params
->
transport
);
*
params
->
session
=
(
ULONG_PTR
)
s
;
return
STATUS_SUCCESS
;
}
...
...
dlls/secur32/secur32_priv.h
View file @
2c44e881
...
...
@@ -126,6 +126,7 @@ struct create_session_params
{
struct
schan_transport
*
transport
;
schan_credentials
*
cred
;
schan_session
*
session
;
};
struct
free_certificate_credentials_params
...
...
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