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
da750b77
Commit
da750b77
authored
Aug 01, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msv1_0: Implement SECPKG_ATTR_SESSION_KEY.
parent
922372e6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
main.c
dlls/msv1_0/main.c
+13
-1
ntlm.c
dlls/secur32/tests/ntlm.c
+10
-0
No files found.
dlls/msv1_0/main.c
View file @
da750b77
...
...
@@ -1138,7 +1138,6 @@ static NTSTATUS NTAPI ntlm_SpQueryContextAttributes( LSA_SEC_HANDLE handle, ULON
X
(
SECPKG_ATTR_NATIVE_NAMES
);
X
(
SECPKG_ATTR_PACKAGE_INFO
);
X
(
SECPKG_ATTR_PASSWORD_EXPIRY
);
X
(
SECPKG_ATTR_SESSION_KEY
);
X
(
SECPKG_ATTR_STREAM_SIZES
);
X
(
SECPKG_ATTR_TARGET_INFORMATION
);
case
SECPKG_ATTR_FLAGS
:
...
...
@@ -1167,6 +1166,19 @@ static NTSTATUS NTAPI ntlm_SpQueryContextAttributes( LSA_SEC_HANDLE handle, ULON
info
->
NegotiationState
=
SECPKG_NEGOTIATION_COMPLETE
;
return
SEC_E_OK
;
}
case
SECPKG_ATTR_SESSION_KEY
:
{
struct
ntlm_ctx
*
ctx
=
(
struct
ntlm_ctx
*
)
handle
;
SecPkgContext_SessionKey
*
key
=
(
SecPkgContext_SessionKey
*
)
buf
;
unsigned
char
*
session_key
;
if
(
!
(
session_key
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
ctx
->
session_key
)
)))
return
SEC_E_INSUFFICIENT_MEMORY
;
memcpy
(
session_key
,
ctx
->
session_key
,
sizeof
(
ctx
->
session_key
)
);
key
->
SessionKey
=
session_key
;
key
->
SessionKeyLength
=
sizeof
(
ctx
->
session_key
);
return
SEC_E_OK
;
}
case
SECPKG_ATTR_KEY_INFO
:
{
struct
ntlm_ctx
*
ctx
=
(
struct
ntlm_ctx
*
)
handle
;
...
...
dlls/secur32/tests/ntlm.c
View file @
da750b77
...
...
@@ -824,6 +824,7 @@ static void testAuth(ULONG data_rep, BOOL fake)
SecPkgContext_StreamSizes
stream_sizes
;
SecPkgContext_NegotiationInfoA
info
;
SecPkgContext_KeyInfoA
key
;
SecPkgContext_SessionKey
session_key
;
SecPkgInfoA
*
pi
;
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
!=
SEC_E_OK
)
...
...
@@ -927,6 +928,15 @@ static void testAuth(ULONG data_rep, BOOL fake)
}
ok
(
key
.
KeySize
==
128
,
"got %lu
\n
"
,
key
.
KeySize
);
ok
(
key
.
EncryptAlgorithm
==
CALG_RC4
,
"got %#lx
\n
"
,
key
.
EncryptAlgorithm
);
FreeContextBuffer
(
key
.
sSignatureAlgorithmName
);
FreeContextBuffer
(
key
.
sEncryptAlgorithmName
);
memset
(
&
session_key
,
0
,
sizeof
(
session_key
)
);
sec_status
=
QueryContextAttributesA
(
&
client
.
ctxt
,
SECPKG_ATTR_SESSION_KEY
,
&
session_key
);
ok
(
sec_status
==
SEC_E_OK
,
"pQueryContextAttributesA returned %08lx
\n
"
,
sec_status
);
ok
(
session_key
.
SessionKeyLength
,
"got 0 key length
\n
"
);
ok
(
session_key
.
SessionKey
!=
NULL
,
"got NULL session key
\n
"
);
FreeContextBuffer
(
session_key
.
SessionKey
);
memset
(
&
info
,
0
,
sizeof
(
info
));
sec_status
=
QueryContextAttributesA
(
&
client
.
ctxt
,
SECPKG_ATTR_NEGOTIATION_INFO
,
&
info
);
...
...
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