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
669aa20c
Commit
669aa20c
authored
Jan 16, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Jan 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust/tests: Add a test for enumerating catalog attributes.
parent
3355f3d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
crypt.c
dlls/wintrust/tests/crypt.c
+17
-0
No files found.
dlls/wintrust/tests/crypt.c
View file @
669aa20c
...
@@ -89,6 +89,7 @@ static BOOL (WINAPI * pCryptCATAdminRemoveCatalog)(HCATADMIN, LPCWSTR, DWORD);
...
@@ -89,6 +89,7 @@ static BOOL (WINAPI * pCryptCATAdminRemoveCatalog)(HCATADMIN, LPCWSTR, DWORD);
static
BOOL
(
WINAPI
*
pCryptCATAdminReleaseCatalogContext
)(
HCATADMIN
,
HCATINFO
,
DWORD
);
static
BOOL
(
WINAPI
*
pCryptCATAdminReleaseCatalogContext
)(
HCATADMIN
,
HCATINFO
,
DWORD
);
static
HANDLE
(
WINAPI
*
pCryptCATOpen
)(
LPWSTR
,
DWORD
,
HCRYPTPROV
,
DWORD
,
DWORD
);
static
HANDLE
(
WINAPI
*
pCryptCATOpen
)(
LPWSTR
,
DWORD
,
HCRYPTPROV
,
DWORD
,
DWORD
);
static
BOOL
(
WINAPI
*
pCryptCATCatalogInfoFromContext
)(
HCATINFO
,
CATALOG_INFO
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pCryptCATCatalogInfoFromContext
)(
HCATINFO
,
CATALOG_INFO
*
,
DWORD
);
static
CRYPTCATATTRIBUTE
*
(
WINAPI
*
pCryptCATEnumerateCatAttr
)(
HANDLE
,
CRYPTCATATTRIBUTE
*
);
static
CRYPTCATMEMBER
*
(
WINAPI
*
pCryptCATEnumerateMember
)(
HANDLE
,
CRYPTCATMEMBER
*
);
static
CRYPTCATMEMBER
*
(
WINAPI
*
pCryptCATEnumerateMember
)(
HANDLE
,
CRYPTCATMEMBER
*
);
static
CRYPTCATATTRIBUTE
*
(
WINAPI
*
pCryptCATEnumerateAttr
)(
HANDLE
,
CRYPTCATMEMBER
*
,
CRYPTCATATTRIBUTE
*
);
static
CRYPTCATATTRIBUTE
*
(
WINAPI
*
pCryptCATEnumerateAttr
)(
HANDLE
,
CRYPTCATMEMBER
*
,
CRYPTCATATTRIBUTE
*
);
static
BOOL
(
WINAPI
*
pCryptCATClose
)(
HANDLE
);
static
BOOL
(
WINAPI
*
pCryptCATClose
)(
HANDLE
);
...
@@ -111,6 +112,7 @@ static void InitFunctionPtrs(void)
...
@@ -111,6 +112,7 @@ static void InitFunctionPtrs(void)
WINTRUST_GET_PROC
(
CryptCATAdminReleaseCatalogContext
)
WINTRUST_GET_PROC
(
CryptCATAdminReleaseCatalogContext
)
WINTRUST_GET_PROC
(
CryptCATOpen
)
WINTRUST_GET_PROC
(
CryptCATOpen
)
WINTRUST_GET_PROC
(
CryptCATCatalogInfoFromContext
)
WINTRUST_GET_PROC
(
CryptCATCatalogInfoFromContext
)
WINTRUST_GET_PROC
(
CryptCATEnumerateCatAttr
)
WINTRUST_GET_PROC
(
CryptCATEnumerateMember
)
WINTRUST_GET_PROC
(
CryptCATEnumerateMember
)
WINTRUST_GET_PROC
(
CryptCATEnumerateAttr
)
WINTRUST_GET_PROC
(
CryptCATEnumerateAttr
)
WINTRUST_GET_PROC
(
CryptCATClose
)
WINTRUST_GET_PROC
(
CryptCATClose
)
...
@@ -483,6 +485,8 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
...
@@ -483,6 +485,8 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
static
void
test_catalog_properties
(
void
)
static
void
test_catalog_properties
(
void
)
{
{
static
const
WCHAR
hashmeW
[]
=
{
'h'
,
'a'
,
's'
,
'h'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
hashmeW
[]
=
{
'h'
,
'a'
,
's'
,
'h'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
attr1W
[]
=
{
'a'
,
't'
,
't'
,
'r'
,
'1'
,
0
};
static
const
WCHAR
attr2W
[]
=
{
'a'
,
't'
,
't'
,
'r'
,
'2'
,
0
};
static
const
GUID
subject
=
{
0xde351a42
,
0x8e59
,
0x11d0
,{
0x8c
,
0x47
,
0x00
,
0xc0
,
0x4f
,
0xc2
,
0x95
,
0xee
}};
static
const
GUID
subject
=
{
0xde351a42
,
0x8e59
,
0x11d0
,{
0x8c
,
0x47
,
0x00
,
0xc0
,
0x4f
,
0xc2
,
0x95
,
0xee
}};
HANDLE
hcat
;
HANDLE
hcat
;
...
@@ -493,6 +497,7 @@ static void test_catalog_properties(void)
...
@@ -493,6 +497,7 @@ static void test_catalog_properties(void)
DWORD
written
;
DWORD
written
;
HANDLE
file
;
HANDLE
file
;
BOOL
ret
;
BOOL
ret
;
int
attrcount
=
0
;
if
(
!
GetTempFileNameA
(
CURR_DIR
,
"cat"
,
0
,
catalog
))
return
;
if
(
!
GetTempFileNameA
(
CURR_DIR
,
"cat"
,
0
,
catalog
))
return
;
file
=
CreateFileA
(
catalog
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
file
=
CreateFileA
(
catalog
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
...
@@ -534,6 +539,18 @@ static void test_catalog_properties(void)
...
@@ -534,6 +539,18 @@ static void test_catalog_properties(void)
m
=
pCryptCATEnumerateMember
(
hcat
,
m
);
m
=
pCryptCATEnumerateMember
(
hcat
,
m
);
ok
(
m
==
NULL
,
"CryptCATEnumerateMember succeeded
\n
"
);
ok
(
m
==
NULL
,
"CryptCATEnumerateMember succeeded
\n
"
);
attr
=
NULL
;
while
((
attr
=
pCryptCATEnumerateCatAttr
(
hcat
,
attr
)))
{
ok
(
!
lstrcmpW
(
attr
->
pwszReferenceTag
,
attr1W
)
||
!
lstrcmpW
(
attr
->
pwszReferenceTag
,
attr2W
),
"Expected 'attr1' or 'attr2'
\n
"
);
attrcount
++
;
}
todo_wine
ok
(
attrcount
==
2
,
"Expected 2 catalog attributes, got %d
\n
"
,
attrcount
);
ret
=
pCryptCATClose
(
hcat
);
ret
=
pCryptCATClose
(
hcat
);
ok
(
ret
,
"CryptCATClose failed
\n
"
);
ok
(
ret
,
"CryptCATClose failed
\n
"
);
...
...
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