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
51571ba5
Commit
51571ba5
authored
Aug 02, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ldap: Use SECPKG_ATTR_SESSION_KEY to retrieve the key size.
parent
26c19ea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
sasl_w.c
libs/ldap/libldap/sasl_w.c
+9
-6
No files found.
libs/ldap/libldap/sasl_w.c
View file @
51571ba5
...
...
@@ -220,6 +220,14 @@ static int fill_auth_identity( const sasl_interact_t *prompts, SEC_WINNT_AUTH_ID
return
SASL_OK
;
}
static
ULONG
get_key_size
(
CtxtHandle
*
ctx
)
{
SecPkgContext_SessionKey
key
;
if
(
QueryContextAttributesA
(
ctx
,
SECPKG_ATTR_SESSION_KEY
,
&
key
))
return
0
;
FreeContextBuffer
(
key
.
SessionKey
);
return
key
.
SessionKeyLength
*
8
;
}
int
sasl_client_start
(
sasl_conn_t
*
handle
,
const
char
*
mechlist
,
sasl_interact_t
**
prompts
,
const
char
**
clientout
,
unsigned
int
*
clientoutlen
,
const
char
**
mech
)
{
...
...
@@ -287,14 +295,9 @@ int sasl_client_step( sasl_conn_t *handle, const char *serverin, unsigned int se
if
(
status
==
SEC_I_CONTINUE_NEEDED
)
return
SASL_CONTINUE
;
else
{
SecPkgContext_KeyInfoA
key
;
SecPkgContext_Sizes
sizes
;
status
=
QueryContextAttributesA
(
&
conn
->
ctxt_handle
,
SECPKG_ATTR_KEY_INFO
,
&
key
);
if
(
status
!=
SEC_E_OK
)
return
SASL_FAIL
;
FreeContextBuffer
(
key
.
sSignatureAlgorithmName
);
FreeContextBuffer
(
key
.
sEncryptAlgorithmName
);
conn
->
ssf
=
key
.
KeySize
;
conn
->
ssf
=
get_key_size
(
&
conn
->
ctxt_handle
);
status
=
QueryContextAttributesA
(
&
conn
->
ctxt_handle
,
SECPKG_ATTR_SIZES
,
&
sizes
);
if
(
status
!=
SEC_E_OK
)
return
SASL_FAIL
;
...
...
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