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
79c5d5cc
Commit
79c5d5cc
authored
Mar 27, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Added SECPKG_ATTR_SUPPORTED_PROTOCOLS tests.
parent
e413b8a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
schannel.c
dlls/secur32/tests/schannel.c
+33
-1
No files found.
dlls/secur32/tests/schannel.c
View file @
79c5d5cc
...
...
@@ -166,6 +166,31 @@ static void test_strength(PCredHandle handle)
trace
(
"strength %d - %d
\n
"
,
strength
.
dwMinimumCipherStrength
,
strength
.
dwMaximumCipherStrength
);
}
static
void
test_supported_protocols
(
CredHandle
*
handle
,
unsigned
exprots
)
{
SecPkgCred_SupportedProtocols
protocols
;
SECURITY_STATUS
status
;
status
=
pQueryCredentialsAttributesA
(
handle
,
SECPKG_ATTR_SUPPORTED_PROTOCOLS
,
&
protocols
);
ok
(
status
==
SEC_E_OK
,
"QueryCredentialsAttributes failed: %08x
\n
"
,
status
);
if
(
exprots
)
ok
(
protocols
.
grbitProtocol
==
exprots
,
"protocols.grbitProtocol = %x, expected %x
\n
"
,
protocols
.
grbitProtocol
,
exprots
);
trace
(
"Supported protocols:
\n
"
);
#define X(flag, name) do { if(protocols.grbitProtocol & flag) { trace(name "\n"); protocols.grbitProtocol &= ~flag; } }while(0)
X
(
SP_PROT_SSL2_CLIENT
,
"SSL 2 client"
);
X
(
SP_PROT_SSL3_CLIENT
,
"SSL 3 client"
);
X
(
SP_PROT_TLS1_0_CLIENT
,
"TLS 1.0 client"
);
X
(
SP_PROT_TLS1_1_CLIENT
,
"TLS 1.1 client"
);
X
(
SP_PROT_TLS1_2_CLIENT
,
"TLS 1.2 client"
);
#undef X
if
(
protocols
.
grbitProtocol
)
trace
(
"Unknown flags: %x
\n
"
,
protocols
.
grbitProtocol
);
}
static
void
testAcquireSecurityContext
(
void
)
{
BOOL
has_schannel
=
FALSE
;
...
...
@@ -261,8 +286,13 @@ static void testAcquireSecurityContext(void)
st
=
pAcquireCredentialsHandleA
(
NULL
,
unisp_name_a
,
SECPKG_CRED_OUTBOUND
,
NULL
,
NULL
,
NULL
,
NULL
,
&
cred
,
NULL
);
ok
(
st
==
SEC_E_OK
,
"AcquireCredentialsHandleA failed: %08x
\n
"
,
st
);
if
(
st
==
SEC_E_OK
)
if
(
st
==
SEC_E_OK
)
{
st
=
pQueryCredentialsAttributesA
(
&
cred
,
SECPKG_ATTR_SUPPORTED_PROTOCOLS
,
NULL
);
ok
(
st
==
SEC_E_INTERNAL_ERROR
,
"QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR
\n
"
,
st
);
test_supported_protocols
(
&
cred
,
0
);
pFreeCredentialsHandle
(
&
cred
);
}
memset
(
&
cred
,
0
,
sizeof
(
cred
));
st
=
pAcquireCredentialsHandleA
(
NULL
,
unisp_name_a
,
SECPKG_CRED_OUTBOUND
,
NULL
,
NULL
,
NULL
,
NULL
,
&
cred
,
&
exp
);
...
...
@@ -650,6 +680,8 @@ static void test_communication(void)
ok
(
status
==
SEC_E_OK
,
"AcquireCredentialsHandleA failed: %08x
\n
"
,
status
);
if
(
status
!=
SEC_E_OK
)
return
;
test_supported_protocols
(
&
cred_handle
,
SP_PROT_SSL3_CLIENT
);
/* Initialize the connection */
init_buffers
(
&
buffers
[
0
],
4
,
buf_size
);
init_buffers
(
&
buffers
[
1
],
4
,
buf_size
);
...
...
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