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
4c88340f
Commit
4c88340f
authored
Nov 03, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Nov 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Add tests for WVTAsn1SpcFinancialCriteriaInfoDecode.
parent
05956a64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
asn.c
dlls/wintrust/tests/asn.c
+33
-0
No files found.
dlls/wintrust/tests/asn.c
View file @
4c88340f
...
...
@@ -65,6 +65,38 @@ static void test_encodeSPCFinancialCriteria(void)
}
}
static
void
test_decodeSPCFinancialCriteria
(
void
)
{
BOOL
ret
;
SPC_FINANCIAL_CRITERIA
criteria
;
DWORD
size
=
sizeof
(
criteria
);
if
(
!
pCryptDecodeObjectEx
)
{
skip
(
"CryptDecodeObjectEx() is not available. Skipping the decodeSPCFinancialCriteria tests
\n
"
);
return
;
}
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
SPC_FINANCIAL_CRITERIA_STRUCT
,
falseCriteria
,
sizeof
(
falseCriteria
),
0
,
NULL
,
&
criteria
,
&
size
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
ok
(
!
criteria
.
fFinancialInfoAvailable
,
"expected FALSE
\n
"
);
ok
(
!
criteria
.
fMeetsCriteria
,
"expected FALSE
\n
"
);
}
ret
=
pCryptDecodeObjectEx
(
X509_ASN_ENCODING
,
SPC_FINANCIAL_CRITERIA_STRUCT
,
trueCriteria
,
sizeof
(
trueCriteria
),
0
,
NULL
,
&
criteria
,
&
size
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
ok
(
criteria
.
fFinancialInfoAvailable
,
"expected TRUE
\n
"
);
ok
(
criteria
.
fMeetsCriteria
,
"expected TRUE
\n
"
);
}
}
static
WCHAR
url
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
static
const
WCHAR
nihongoURL
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
0x226f
,
...
...
@@ -763,6 +795,7 @@ START_TEST(asn)
pCryptEncodeObjectEx
=
(
void
*
)
GetProcAddress
(
hCrypt32
,
"CryptEncodeObjectEx"
);
test_encodeSPCFinancialCriteria
();
test_decodeSPCFinancialCriteria
();
test_encodeSPCLink
();
test_decodeSPCLink
();
test_encodeSPCPEImage
();
...
...
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