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
cd084ff1
Commit
cd084ff1
authored
Mar 03, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Oct 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Test the pgKnownSubject field of WINTRUST_FILE_INFO.
parent
1f4febdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
softpub.c
dlls/wintrust/tests/softpub.c
+24
-0
No files found.
dlls/wintrust/tests/softpub.c
View file @
cd084ff1
...
@@ -266,6 +266,8 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
...
@@ -266,6 +266,8 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
PROVDATA_SIP
provDataSIP
=
{
0
};
PROVDATA_SIP
provDataSIP
=
{
0
};
static
const
GUID
unknown
=
{
0xC689AAB8
,
0x8E78
,
0x11D0
,
{
0x8C
,
0x47
,
static
const
GUID
unknown
=
{
0xC689AAB8
,
0x8E78
,
0x11D0
,
{
0x8C
,
0x47
,
0x00
,
0xC0
,
0x4F
,
0xC2
,
0x95
,
0xEE
}
};
0x00
,
0xC0
,
0x4F
,
0xC2
,
0x95
,
0xEE
}
};
static
GUID
bogusGuid
=
{
0xdeadbeef
,
0xbaad
,
0xf00d
,
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
}
};
ret
=
funcs
->
pfnObjectTrust
(
&
data
);
ret
=
funcs
->
pfnObjectTrust
(
&
data
);
ok
(
ret
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
ret
);
ok
(
ret
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
ret
);
...
@@ -317,6 +319,28 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
...
@@ -317,6 +319,28 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
ok
(
provDataSIP
.
psSipSubjectInfo
!=
NULL
,
ok
(
provDataSIP
.
psSipSubjectInfo
!=
NULL
,
"Expected a subject info
\n
"
);
"Expected a subject info
\n
"
);
}
}
/* Specifying the GUID results in that GUID being the subject GUID */
fileInfo
.
pgKnownSubject
=
&
bogusGuid
;
ret
=
funcs
->
pfnObjectTrust
(
&
data
);
ok
(
ret
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
ret
);
ok
(
data
.
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]
==
TRUST_E_NOSIGNATURE
||
data
.
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]
==
TRUST_E_SUBJECT_FORM_UNKNOWN
,
"Expected TRUST_E_NOSIGNATURE or TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x
\n
"
,
data
.
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]);
if
(
data
.
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]
==
TRUST_E_NOSIGNATURE
)
{
ok
(
!
memcmp
(
&
provDataSIP
.
gSubject
,
&
bogusGuid
,
sizeof
(
bogusGuid
)),
"unexpected subject GUID
\n
"
);
}
/* Specifying a bogus GUID pointer crashes */
if
(
0
)
{
fileInfo
.
pgKnownSubject
=
(
GUID
*
)
0xdeadbeef
;
ret
=
funcs
->
pfnObjectTrust
(
&
data
);
}
funcs
->
pfnFree
(
data
.
padwTrustStepErrors
);
funcs
->
pfnFree
(
data
.
padwTrustStepErrors
);
}
}
}
}
...
...
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