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
6b5f7df5
Commit
6b5f7df5
authored
Mar 13, 2011
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Set session credentials in schan_imp_create_session.
parent
3d47fce3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
schannel.c
dlls/secur32/schannel.c
+12
-13
No files found.
dlls/secur32/schannel.c
View file @
6b5f7df5
...
...
@@ -113,7 +113,8 @@ static ssize_t schan_push_adapter(gnutls_transport_ptr_t transport,
return
buff_len
;
}
static
BOOL
schan_imp_create_session
(
gnutls_session_t
*
s
,
BOOL
is_server
)
static
BOOL
schan_imp_create_session
(
gnutls_session_t
*
s
,
BOOL
is_server
,
gnutls_certificate_credentials
cred
)
{
int
err
=
pgnutls_init
(
s
,
is_server
?
GNUTLS_SERVER
:
GNUTLS_CLIENT
);
if
(
err
!=
GNUTLS_E_SUCCESS
)
...
...
@@ -132,6 +133,14 @@ static BOOL schan_imp_create_session(gnutls_session_t *s, BOOL is_server)
return
FALSE
;
}
err
=
pgnutls_credentials_set
(
*
s
,
GNUTLS_CRD_CERTIFICATE
,
cred
);
if
(
err
!=
GNUTLS_E_SUCCESS
)
{
pgnutls_perror
(
err
);
pgnutls_deinit
(
*
s
);
return
FALSE
;
}
pgnutls_transport_set_pull_function
(
*
s
,
schan_pull_adapter
);
pgnutls_transport_set_push_function
(
*
s
,
schan_push_adapter
);
...
...
@@ -1010,7 +1019,6 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
struct
schan_buffers
*
out_buffers
;
struct
schan_credentials
*
cred
;
struct
schan_transport
transport
;
int
err
;
SECURITY_STATUS
ret
;
TRACE
(
"%p %p %s 0x%08x %d %d %p %d %p %p %p %p
\n
"
,
phCredential
,
phContext
,
...
...
@@ -1045,22 +1053,13 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
return
SEC_E_INTERNAL_ERROR
;
}
if
(
!
schan_imp_create_session
(
&
ctx
->
session
,
FALSE
))
if
(
!
schan_imp_create_session
(
&
ctx
->
session
,
FALSE
,
cred
->
credentials
))
{
schan_free_handle
(
handle
,
SCHAN_HANDLE_CTX
);
HeapFree
(
GetProcessHeap
(),
0
,
ctx
);
return
SEC_E_INTERNAL_ERROR
;
}
err
=
pgnutls_credentials_set
(
ctx
->
session
,
GNUTLS_CRD_CERTIFICATE
,
cred
->
credentials
);
if
(
err
!=
GNUTLS_E_SUCCESS
)
{
pgnutls_perror
(
err
);
schan_imp_dispose_session
(
ctx
->
session
);
schan_free_handle
(
handle
,
SCHAN_HANDLE_CTX
);
HeapFree
(
GetProcessHeap
(),
0
,
ctx
);
}
phNewContext
->
dwLower
=
handle
;
phNewContext
->
dwUpper
=
0
;
}
...
...
@@ -1685,7 +1684,7 @@ void SECUR32_deinitSchannelSP(void)
if
(
!
libgnutls_handle
)
return
;
/* deinitialized sessions first because a pointer to the credentials
*
are stored for the session by calling gnutls_credentials_set
. */
*
may be stored for the session
. */
while
(
i
--
)
{
if
(
schan_handle_table
[
i
].
type
==
SCHAN_HANDLE_CTX
)
...
...
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