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
87368bb6
Commit
87368bb6
authored
Mar 12, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Improve SECPKG_ATTR_CIPHER_STRENGTHS stub.
parent
d11e30e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
schannel.c
dlls/secur32/schannel.c
+8
-4
schannel.c
dlls/secur32/tests/schannel.c
+15
-0
No files found.
dlls/secur32/schannel.c
View file @
87368bb6
...
@@ -39,7 +39,7 @@ static SECURITY_STATUS schan_QueryCredentialsAttributes(
...
@@ -39,7 +39,7 @@ static SECURITY_STATUS schan_QueryCredentialsAttributes(
if
(
pBuffer
)
if
(
pBuffer
)
{
{
/* FIXME: get from CryptoAPI */
/* FIXME: get from CryptoAPI */
FIXME
(
"
%d: stub
\n
"
,
ulAttribute
);
FIXME
(
"
SECPKG_ATTR_SUPPORTED_ALGS: stub
\n
"
);
ret
=
SEC_E_UNSUPPORTED_FUNCTION
;
ret
=
SEC_E_UNSUPPORTED_FUNCTION
;
}
}
else
else
...
@@ -48,9 +48,13 @@ static SECURITY_STATUS schan_QueryCredentialsAttributes(
...
@@ -48,9 +48,13 @@ static SECURITY_STATUS schan_QueryCredentialsAttributes(
case
SECPKG_ATTR_CIPHER_STRENGTHS
:
case
SECPKG_ATTR_CIPHER_STRENGTHS
:
if
(
pBuffer
)
if
(
pBuffer
)
{
{
SecPkgCred_CipherStrengths
*
r
=
(
SecPkgCred_CipherStrengths
*
)
pBuffer
;
/* FIXME: get from CryptoAPI */
/* FIXME: get from CryptoAPI */
FIXME
(
"%d: stub
\n
"
,
ulAttribute
);
FIXME
(
"SECPKG_ATTR_CIPHER_STRENGTHS: semi-stub
\n
"
);
ret
=
SEC_E_UNSUPPORTED_FUNCTION
;
r
->
dwMinimumCipherStrength
=
40
;
r
->
dwMaximumCipherStrength
=
168
;
ret
=
SEC_E_OK
;
}
}
else
else
ret
=
SEC_E_INTERNAL_ERROR
;
ret
=
SEC_E_INTERNAL_ERROR
;
...
@@ -59,7 +63,7 @@ static SECURITY_STATUS schan_QueryCredentialsAttributes(
...
@@ -59,7 +63,7 @@ static SECURITY_STATUS schan_QueryCredentialsAttributes(
if
(
pBuffer
)
if
(
pBuffer
)
{
{
/* FIXME: get from OpenSSL? */
/* FIXME: get from OpenSSL? */
FIXME
(
"
%d: stub
\n
"
,
ulAttribute
);
FIXME
(
"
SECPKG_ATTR_SUPPORTED_PROTOCOLS: stub
\n
"
);
ret
=
SEC_E_UNSUPPORTED_FUNCTION
;
ret
=
SEC_E_UNSUPPORTED_FUNCTION
;
}
}
else
else
...
...
dlls/secur32/tests/schannel.c
View file @
87368bb6
...
@@ -31,6 +31,7 @@ static HMODULE secdll, crypt32dll;
...
@@ -31,6 +31,7 @@ static HMODULE secdll, crypt32dll;
static
ACQUIRE_CREDENTIALS_HANDLE_FN_A
pAcquireCredentialsHandleA
;
static
ACQUIRE_CREDENTIALS_HANDLE_FN_A
pAcquireCredentialsHandleA
;
static
FREE_CREDENTIALS_HANDLE_FN
pFreeCredentialsHandle
;
static
FREE_CREDENTIALS_HANDLE_FN
pFreeCredentialsHandle
;
static
QUERY_CREDENTIALS_ATTRIBUTES_FN_A
pQueryCredentialsAttributesA
;
static
PCCERT_CONTEXT
(
WINAPI
*
pCertCreateCertificateContext
)(
DWORD
,
const
BYTE
*
,
DWORD
);
static
PCCERT_CONTEXT
(
WINAPI
*
pCertCreateCertificateContext
)(
DWORD
,
const
BYTE
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pCertFreeCertificateContext
)(
PCCERT_CONTEXT
);
static
BOOL
(
WINAPI
*
pCertFreeCertificateContext
)(
PCCERT_CONTEXT
);
...
@@ -120,6 +121,7 @@ static void InitFunctionPtrs(void)
...
@@ -120,6 +121,7 @@ static void InitFunctionPtrs(void)
{
{
GET_PROC
(
secdll
,
AcquireCredentialsHandleA
);
GET_PROC
(
secdll
,
AcquireCredentialsHandleA
);
GET_PROC
(
secdll
,
FreeCredentialsHandle
);
GET_PROC
(
secdll
,
FreeCredentialsHandle
);
GET_PROC
(
secdll
,
QueryCredentialsAttributesA
);
}
}
GET_PROC
(
advapi32dll
,
CryptAcquireContextW
);
GET_PROC
(
advapi32dll
,
CryptAcquireContextW
);
...
@@ -134,6 +136,18 @@ static void InitFunctionPtrs(void)
...
@@ -134,6 +136,18 @@ static void InitFunctionPtrs(void)
#undef GET_PROC
#undef GET_PROC
}
}
static
void
test_strength
(
PCredHandle
handle
)
{
SecPkgCred_CipherStrengths
strength
=
{
-
1
,
-
1
};
SECURITY_STATUS
st
;
st
=
pQueryCredentialsAttributesA
(
handle
,
SECPKG_ATTR_CIPHER_STRENGTHS
,
&
strength
);
ok
(
st
==
SEC_E_OK
,
"QueryCredentialsAttributesA failed: %u
\n
"
,
GetLastError
());
ok
(
strength
.
dwMinimumCipherStrength
,
"dwMinimumCipherStrength not changed
\n
"
);
ok
(
strength
.
dwMaximumCipherStrength
,
"dwMaximumCipherStrength not changed
\n
"
);
trace
(
"strength %d - %d
\n
"
,
strength
.
dwMinimumCipherStrength
,
strength
.
dwMaximumCipherStrength
);
}
static
void
testAcquireSecurityContext
(
void
)
static
void
testAcquireSecurityContext
(
void
)
{
{
SECURITY_STATUS
st
;
SECURITY_STATUS
st
;
...
@@ -347,6 +361,7 @@ static void testAcquireSecurityContext(void)
...
@@ -347,6 +361,7 @@ static void testAcquireSecurityContext(void)
st
=
pAcquireCredentialsHandleA
(
NULL
,
unisp_name_a
,
SECPKG_CRED_INBOUND
,
st
=
pAcquireCredentialsHandleA
(
NULL
,
unisp_name_a
,
SECPKG_CRED_INBOUND
,
NULL
,
&
schanCred
,
NULL
,
NULL
,
&
cred
,
NULL
);
NULL
,
&
schanCred
,
NULL
,
NULL
,
&
cred
,
NULL
);
ok
(
st
==
SEC_E_OK
,
"AcquireCredentialsHandleA failed: %08x
\n
"
,
st
);
ok
(
st
==
SEC_E_OK
,
"AcquireCredentialsHandleA failed: %08x
\n
"
,
st
);
test_strength
(
&
cred
);
pFreeCredentialsHandle
(
&
cred
);
pFreeCredentialsHandle
(
&
cred
);
/* How about more than one cert? */
/* How about more than one cert? */
...
...
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