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
9531fede
Commit
9531fede
authored
Feb 22, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c6c95e3b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
127 additions
and
128 deletions
+127
-128
Makefile.in
dlls/wintrust/Makefile.in
+0
-1
asn.c
dlls/wintrust/asn.c
+45
-45
crypt.c
dlls/wintrust/crypt.c
+25
-25
register.c
dlls/wintrust/register.c
+2
-2
softpub.c
dlls/wintrust/softpub.c
+18
-18
wintrust_main.c
dlls/wintrust/wintrust_main.c
+37
-37
No files found.
dlls/wintrust/Makefile.in
View file @
9531fede
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
wintrust.dll
IMPORTLIB
=
wintrust
IMPORTS
=
crypt32 user32 advapi32
...
...
dlls/wintrust/asn.c
View file @
9531fede
...
...
@@ -100,7 +100,7 @@ static BOOL WINAPI CRYPT_AsnEncodeOctets(DWORD dwCertEncodingType,
const
CRYPT_DATA_BLOB
*
blob
=
pvStructInfo
;
DWORD
bytesNeeded
,
lenBytes
;
TRACE
(
"(%
d, %p), %p, %
d
\n
"
,
blob
->
cbData
,
blob
->
pbData
,
pbEncoded
,
TRACE
(
"(%
ld, %p), %p, %l
d
\n
"
,
blob
->
cbData
,
blob
->
pbData
,
pbEncoded
,
*
pcbEncoded
);
CRYPT_EncodeLen
(
blob
->
cbData
,
NULL
,
&
lenBytes
);
...
...
@@ -131,7 +131,7 @@ BOOL WINAPI WVTAsn1SpcLinkEncode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
TRACE
(
"(0x%08
l
x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
...
...
@@ -296,7 +296,7 @@ static BOOL CRYPT_AsnEncodeSequence(DWORD dwCertEncodingType,
BOOL
ret
;
DWORD
i
,
dataLen
=
0
;
TRACE
(
"%p, %
d, %p, %
d
\n
"
,
items
,
cItem
,
pbEncoded
,
*
pcbEncoded
);
TRACE
(
"%p, %
ld, %p, %l
d
\n
"
,
items
,
cItem
,
pbEncoded
,
*
pcbEncoded
);
for
(
i
=
0
,
ret
=
TRUE
;
ret
&&
i
<
cItem
;
i
++
)
{
ret
=
items
[
i
].
encodeFunc
(
dwCertEncodingType
,
NULL
,
...
...
@@ -472,7 +472,7 @@ BOOL WINAPI WVTAsn1SpcPeImageDataEncode(DWORD dwCertEncodingType,
const
SPC_PE_IMAGE_DATA
*
imageData
=
pvStructInfo
;
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
TRACE
(
"(0x%08
l
x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
...
...
@@ -715,7 +715,7 @@ BOOL WINAPI WVTAsn1SpcIndirectDataContentEncode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
TRACE
(
"(0x%08
l
x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
__TRY
...
...
@@ -807,7 +807,7 @@ BOOL WINAPI WVTAsn1SpcSpOpusInfoEncode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
TRACE
(
"(0x%08
l
x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
__TRY
...
...
@@ -982,7 +982,7 @@ BOOL WINAPI WVTAsn1CatMemberInfoEncode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
TRACE
(
"(0x%08
l
x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
__TRY
...
...
@@ -1010,7 +1010,7 @@ BOOL WINAPI WVTAsn1CatNameValueEncode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
TRACE
(
"(0x%08
l
x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
__TRY
...
...
@@ -1060,7 +1060,7 @@ static BOOL WINAPI CRYPT_AsnEncodeBool(DWORD dwCertEncodingType,
*
pbEncoded
++
=
val
?
0xff
:
0
;
ret
=
TRUE
;
}
TRACE
(
"returning %d (%08x)
\n
"
,
ret
,
GetLastError
());
TRACE
(
"returning %d (%08
l
x)
\n
"
,
ret
,
GetLastError
());
return
ret
;
}
...
...
@@ -1070,7 +1070,7 @@ BOOL WINAPI WVTAsn1SpcFinancialCriteriaInfoEncode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(0x%08x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
TRACE
(
"(0x%08
l
x, %s, %p, %p, %p)
\n
"
,
dwCertEncodingType
,
debugstr_a
(
lpszStructType
),
pvStructInfo
,
pbEncoded
,
pcbEncoded
);
__TRY
...
...
@@ -1174,7 +1174,7 @@ static BOOL WINAPI CRYPT_AsnDecodeOctets(DWORD dwCertEncodingType,
BOOL
ret
;
DWORD
bytesNeeded
,
dataLen
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
if
(
!
cbEncoded
)
...
...
@@ -1229,7 +1229,7 @@ static BOOL CRYPT_AsnDecodeSPCLinkInternal(DWORD dwCertEncodingType,
BOOL
ret
=
FALSE
;
DWORD
bytesNeeded
=
sizeof
(
SPC_LINK
),
dataLen
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
if
((
ret
=
CRYPT_GetLen
(
pbEncoded
,
cbEncoded
,
&
dataLen
)))
...
...
@@ -1385,7 +1385,7 @@ BOOL WINAPI WVTAsn1SpcLinkDecode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
__TRY
...
...
@@ -1486,7 +1486,7 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType,
DWORD
i
,
decoded
=
0
;
const
BYTE
*
ptr
=
pbEncoded
;
TRACE
(
"%p, %
d, %p, %d, %08
x, %p, %p, %p
\n
"
,
items
,
cItem
,
pbEncoded
,
TRACE
(
"%p, %
ld, %p, %ld, %08l
x, %p, %p, %p
\n
"
,
items
,
cItem
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
nextData
,
cbDecoded
);
for
(
i
=
0
,
ret
=
TRUE
;
ret
&&
i
<
cItem
;
i
++
)
...
...
@@ -1512,9 +1512,9 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType,
if
(
items
[
i
].
decodeFunc
)
{
if
(
pvStructInfo
)
TRACE
(
"decoding item %d
\n
"
,
i
);
TRACE
(
"decoding item %
l
d
\n
"
,
i
);
else
TRACE
(
"sizing item %d
\n
"
,
i
);
TRACE
(
"sizing item %
l
d
\n
"
,
i
);
ret
=
items
[
i
].
decodeFunc
(
dwCertEncodingType
,
NULL
,
ptr
,
1
+
nextItemLenBytes
+
nextItemLen
,
dwFlags
&
~
CRYPT_DECODE_ALLOC_FLAG
,
...
...
@@ -1529,30 +1529,30 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType,
/* Account for alignment padding */
items
[
i
].
size
=
ALIGN_DWORD_PTR
(
items
[
i
].
size
);
}
TRACE
(
"item %
d size: %
d
\n
"
,
i
,
items
[
i
].
size
);
TRACE
(
"item %
ld size: %l
d
\n
"
,
i
,
items
[
i
].
size
);
if
(
nextData
&&
items
[
i
].
hasPointer
&&
items
[
i
].
size
>
items
[
i
].
minSize
)
nextData
+=
items
[
i
].
size
-
items
[
i
].
minSize
;
ptr
+=
1
+
nextItemLenBytes
+
nextItemLen
;
decoded
+=
1
+
nextItemLenBytes
+
nextItemLen
;
TRACE
(
"item %
d: decoded %
d bytes
\n
"
,
i
,
TRACE
(
"item %
ld: decoded %l
d bytes
\n
"
,
i
,
1
+
nextItemLenBytes
+
nextItemLen
);
}
else
if
(
items
[
i
].
optional
&&
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
)
{
TRACE
(
"skipping optional item %d
\n
"
,
i
);
TRACE
(
"skipping optional item %
l
d
\n
"
,
i
);
items
[
i
].
size
=
items
[
i
].
minSize
;
SetLastError
(
NOERROR
);
ret
=
TRUE
;
}
else
TRACE
(
"item %
d failed: %08
x
\n
"
,
i
,
TRACE
(
"item %
ld failed: %08l
x
\n
"
,
i
,
GetLastError
());
}
else
{
TRACE
(
"item %
d: decoded %
d bytes
\n
"
,
i
,
TRACE
(
"item %
ld: decoded %l
d bytes
\n
"
,
i
,
1
+
nextItemLenBytes
+
nextItemLen
);
ptr
+=
1
+
nextItemLenBytes
+
nextItemLen
;
decoded
+=
1
+
nextItemLenBytes
+
nextItemLen
;
...
...
@@ -1561,12 +1561,12 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType,
}
else
if
(
items
[
i
].
optional
)
{
TRACE
(
"skipping optional item %d
\n
"
,
i
);
TRACE
(
"skipping optional item %
l
d
\n
"
,
i
);
items
[
i
].
size
=
items
[
i
].
minSize
;
}
else
{
TRACE
(
"item %d: tag %02x doesn't match expected %02x
\n
"
,
TRACE
(
"item %
l
d: tag %02x doesn't match expected %02x
\n
"
,
i
,
ptr
[
0
],
items
[
i
].
tag
);
SetLastError
(
CRYPT_E_ASN1_BADTAG
);
ret
=
FALSE
;
...
...
@@ -1575,12 +1575,12 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType,
}
else
if
(
items
[
i
].
optional
)
{
TRACE
(
"missing optional item %d, skipping
\n
"
,
i
);
TRACE
(
"missing optional item %
l
d, skipping
\n
"
,
i
);
items
[
i
].
size
=
items
[
i
].
minSize
;
}
else
{
TRACE
(
"not enough bytes for item %d, failing
\n
"
,
i
);
TRACE
(
"not enough bytes for item %
l
d, failing
\n
"
,
i
);
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
}
...
...
@@ -1605,7 +1605,7 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
{
BOOL
ret
;
TRACE
(
"%p, %
d, %p, %d, %08x, %p, %
d, %p
\n
"
,
items
,
cItem
,
pbEncoded
,
TRACE
(
"%p, %
ld, %p, %ld, %08lx, %p, %l
d, %p
\n
"
,
items
,
cItem
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
,
startingPointer
);
if
(
pbEncoded
[
0
]
==
ASN_SEQUENCE
)
...
...
@@ -1620,7 +1620,7 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
cbEncoded
-=
1
+
lenBytes
;
if
(
cbEncoded
<
dataLen
)
{
TRACE
(
"dataLen %
d exceeds cbEncoded %
d, failing
\n
"
,
dataLen
,
TRACE
(
"dataLen %
ld exceeds cbEncoded %l
d, failing
\n
"
,
dataLen
,
cbEncoded
);
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
...
...
@@ -1630,7 +1630,7 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
cbEncoded
,
dwFlags
,
NULL
,
NULL
,
&
cbDecoded
);
if
(
ret
&&
cbDecoded
!=
dataLen
)
{
TRACE
(
"expected %
d decoded, got %
d, failing
\n
"
,
dataLen
,
TRACE
(
"expected %
ld decoded, got %l
d, failing
\n
"
,
dataLen
,
cbDecoded
);
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
...
...
@@ -1674,7 +1674,7 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
SetLastError
(
CRYPT_E_ASN1_BADTAG
);
ret
=
FALSE
;
}
TRACE
(
"returning %d (%08x)
\n
"
,
ret
,
GetLastError
());
TRACE
(
"returning %d (%08
l
x)
\n
"
,
ret
,
GetLastError
());
return
ret
;
}
...
...
@@ -1684,7 +1684,7 @@ static BOOL WINAPI CRYPT_AsnDecodeBitsInternal(DWORD dwCertEncodingType,
{
BOOL
ret
;
TRACE
(
"(%p, %
d, 0x%08x, %p, %
d)
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"(%p, %
ld, 0x%08lx, %p, %l
d)
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
if
(
pbEncoded
[
0
]
==
ASN_BITSTRING
)
...
...
@@ -1738,7 +1738,7 @@ static BOOL WINAPI CRYPT_AsnDecodeBitsInternal(DWORD dwCertEncodingType,
SetLastError
(
CRYPT_E_ASN1_BADTAG
);
ret
=
FALSE
;
}
TRACE
(
"returning %d (%08x)
\n
"
,
ret
,
GetLastError
());
TRACE
(
"returning %d (%08
l
x)
\n
"
,
ret
,
GetLastError
());
return
ret
;
}
...
...
@@ -1791,7 +1791,7 @@ BOOL WINAPI WVTAsn1SpcPeImageDataDecode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
__TRY
...
...
@@ -1824,7 +1824,7 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType,
BOOL
ret
=
TRUE
;
DWORD
dataLen
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
if
((
ret
=
CRYPT_GetLen
(
pbEncoded
,
cbEncoded
,
&
dataLen
)))
...
...
@@ -1924,7 +1924,7 @@ static BOOL WINAPI CRYPT_AsnDecodeOid(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
if
(
!
cbEncoded
)
...
...
@@ -1944,7 +1944,7 @@ static BOOL WINAPI CRYPT_AsnDecodeCopyBytes(DWORD dwCertEncodingType,
BOOL
ret
=
TRUE
;
DWORD
bytesNeeded
=
sizeof
(
CRYPT_OBJID_BLOB
);
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
if
(
!
(
dwFlags
&
CRYPT_DECODE_NOCOPY_FLAG
))
...
...
@@ -1988,7 +1988,7 @@ static BOOL WINAPI CRYPT_AsnDecodeAttributeTypeValue(DWORD dwCertEncodingType,
offsetof
(
CRYPT_ATTRIBUTE_TYPE_VALUE
,
Value
.
pbData
),
0
},
};
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
return
CRYPT_AsnDecodeSequence
(
dwCertEncodingType
,
items
,
ARRAY_SIZE
(
items
),
...
...
@@ -2011,7 +2011,7 @@ static BOOL WINAPI CRYPT_AsnDecodeAlgorithmId(DWORD dwCertEncodingType,
offsetof
(
CRYPT_ALGORITHM_IDENTIFIER
,
Parameters
.
pbData
),
0
},
};
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
ret
=
CRYPT_AsnDecodeSequence
(
dwCertEncodingType
,
items
,
ARRAY_SIZE
(
items
),
...
...
@@ -2039,7 +2039,7 @@ static BOOL WINAPI CRYPT_AsnDecodeSPCDigest(DWORD dwCertEncodingType,
FALSE
,
TRUE
,
offsetof
(
struct
SPCDigest
,
Digest
.
pbData
),
0
},
};
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
return
CRYPT_AsnDecodeSequence
(
dwCertEncodingType
,
items
,
ARRAY_SIZE
(
items
),
...
...
@@ -2053,7 +2053,7 @@ BOOL WINAPI WVTAsn1SpcIndirectDataContentDecode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
__TRY
...
...
@@ -2126,7 +2126,7 @@ static BOOL WINAPI CRYPT_AsnDecodeProgramName(DWORD dwCertEncodingType,
BOOL
ret
=
FALSE
;
DWORD
dataLen
;
TRACE
(
"(%p, %
d, %08x, %p, %
d)
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"(%p, %
ld, %08lx, %p, %l
d)
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
pvStructInfo
?
*
pcbStructInfo
:
0
);
if
((
ret
=
CRYPT_GetLen
(
pbEncoded
,
cbEncoded
,
&
dataLen
)))
...
...
@@ -2146,7 +2146,7 @@ BOOL WINAPI WVTAsn1SpcSpOpusInfoDecode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
__TRY
...
...
@@ -2233,7 +2233,7 @@ BOOL WINAPI WVTAsn1CatMemberInfoDecode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
__TRY
...
...
@@ -2265,7 +2265,7 @@ BOOL WINAPI WVTAsn1CatNameValueDecode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %
d, %08x, %p, %
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"%p, %
ld, %08lx, %p, %l
d
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
__TRY
...
...
@@ -2332,7 +2332,7 @@ static BOOL WINAPI CRYPT_AsnDecodeBool(DWORD dwCertEncodingType,
*
(
BOOL
*
)
pvStructInfo
=
pbEncoded
[
2
]
!=
0
;
ret
=
TRUE
;
}
TRACE
(
"returning %d (%08x)
\n
"
,
ret
,
GetLastError
());
TRACE
(
"returning %d (%08
l
x)
\n
"
,
ret
,
GetLastError
());
return
ret
;
}
...
...
@@ -2342,7 +2342,7 @@ BOOL WINAPI WVTAsn1SpcFinancialCriteriaInfoDecode(DWORD dwCertEncodingType,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(%p, %
d, %08x, %p, %
d)
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
TRACE
(
"(%p, %
ld, %08lx, %p, %l
d)
\n
"
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
*
pcbStructInfo
);
__TRY
...
...
dlls/wintrust/crypt.c
View file @
9531fede
...
...
@@ -110,7 +110,7 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin,
WCHAR
catroot_dir
[
MAX_PATH
];
struct
catadmin
*
ca
;
TRACE
(
"%p %s %x
\n
"
,
catAdmin
,
debugstr_guid
(
sys
),
dwFlags
);
TRACE
(
"%p %s %
l
x
\n
"
,
catAdmin
,
debugstr_guid
(
sys
),
dwFlags
);
if
(
!
catAdmin
||
dwFlags
)
{
...
...
@@ -151,7 +151,7 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin,
BOOL
WINAPI
CryptCATAdminAcquireContext2
(
HCATADMIN
*
catAdmin
,
const
GUID
*
sys
,
const
WCHAR
*
algorithm
,
const
CERT_STRONG_SIGN_PARA
*
policy
,
DWORD
flags
)
{
FIXME
(
"%p %s %s %p %x stub
\n
"
,
catAdmin
,
debugstr_guid
(
sys
),
debugstr_w
(
algorithm
),
policy
,
flags
);
FIXME
(
"%p %s %s %p %
l
x stub
\n
"
,
catAdmin
,
debugstr_guid
(
sys
),
debugstr_w
(
algorithm
),
policy
,
flags
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
...
...
@@ -168,7 +168,7 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile,
WCHAR
*
target
;
DWORD
len
;
TRACE
(
"%p %s %s %d
\n
"
,
catAdmin
,
debugstr_w
(
catalogFile
),
TRACE
(
"%p %s %s %
l
d
\n
"
,
catAdmin
,
debugstr_w
(
catalogFile
),
debugstr_w
(
selectBaseName
),
flags
);
if
(
!
selectBaseName
)
...
...
@@ -221,7 +221,7 @@ BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash,
{
BOOL
ret
=
FALSE
;
TRACE
(
"%p %p %p %x
\n
"
,
hFile
,
pcbHash
,
pbHash
,
dwFlags
);
TRACE
(
"%p %p %p %
l
x
\n
"
,
hFile
,
pcbHash
,
pbHash
,
dwFlags
);
if
(
!
hFile
||
!
pcbHash
||
dwFlags
)
{
...
...
@@ -291,7 +291,7 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
DWORD
size
;
BOOL
ret
;
TRACE
(
"%p %p %
d %
x %p
\n
"
,
hCatAdmin
,
pbHash
,
cbHash
,
dwFlags
,
phPrevCatInfo
);
TRACE
(
"%p %p %
ld %l
x %p
\n
"
,
hCatAdmin
,
pbHash
,
cbHash
,
dwFlags
,
phPrevCatInfo
);
if
(
!
ca
||
ca
->
magic
!=
CATADMIN_MAGIC
||
!
pbHash
||
cbHash
!=
20
||
dwFlags
)
{
...
...
@@ -354,14 +354,14 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
hcat
=
CryptCATOpen
(
filename
,
CRYPTCAT_OPEN_EXISTING
,
prov
,
0
,
0
);
if
(
hcat
==
INVALID_HANDLE_VALUE
)
{
WARN
(
"couldn't open %s (%u)
\n
"
,
debugstr_w
(
filename
),
GetLastError
());
WARN
(
"couldn't open %s (%
l
u)
\n
"
,
debugstr_w
(
filename
),
GetLastError
());
continue
;
}
while
((
member
=
CryptCATEnumerateMember
(
hcat
,
member
)))
{
if
(
member
->
pIndirectData
->
Digest
.
cbData
!=
cbHash
)
{
WARN
(
"amount of hash bytes differs: %
u/%
u
\n
"
,
member
->
pIndirectData
->
Digest
.
cbData
,
cbHash
);
WARN
(
"amount of hash bytes differs: %
lu/%l
u
\n
"
,
member
->
pIndirectData
->
Digest
.
cbData
,
cbHash
);
continue
;
}
if
(
!
memcmp
(
member
->
pIndirectData
->
Digest
.
pbData
,
pbHash
,
cbHash
))
...
...
@@ -416,7 +416,7 @@ BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN hCatAdmin,
struct
catinfo
*
ci
=
hCatInfo
;
struct
catadmin
*
ca
=
hCatAdmin
;
TRACE
(
"%p %p %x
\n
"
,
hCatAdmin
,
hCatInfo
,
dwFlags
);
TRACE
(
"%p %p %
l
x
\n
"
,
hCatAdmin
,
hCatInfo
,
dwFlags
);
if
(
!
ca
||
ca
->
magic
!=
CATADMIN_MAGIC
||
!
ci
||
ci
->
magic
!=
CATINFO_MAGIC
)
{
...
...
@@ -445,7 +445,7 @@ BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
{
struct
catadmin
*
ca
=
hCatAdmin
;
TRACE
(
"%p %x
\n
"
,
hCatAdmin
,
dwFlags
);
TRACE
(
"%p %
l
x
\n
"
,
hCatAdmin
,
dwFlags
);
if
(
!
ca
||
ca
->
magic
!=
CATADMIN_MAGIC
)
{
...
...
@@ -476,7 +476,7 @@ BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN hCatAdmin, LPCWSTR pwszCatalogF
{
struct
catadmin
*
ca
=
hCatAdmin
;
TRACE
(
"%p %s %x
\n
"
,
hCatAdmin
,
debugstr_w
(
pwszCatalogFile
),
dwFlags
);
TRACE
(
"%p %s %
l
x
\n
"
,
hCatAdmin
,
debugstr_w
(
pwszCatalogFile
),
dwFlags
);
if
(
!
ca
||
ca
->
magic
!=
CATADMIN_MAGIC
)
{
...
...
@@ -520,7 +520,7 @@ BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN hcatadmin, WCHAR *catalog_
static
const
WCHAR
slashW
[]
=
{
'\\'
,
0
};
struct
catadmin
*
ca
=
hcatadmin
;
TRACE
(
"%p %s %p %x
\n
"
,
hcatadmin
,
debugstr_w
(
catalog_file
),
info
,
flags
);
TRACE
(
"%p %s %p %
l
x
\n
"
,
hcatadmin
,
debugstr_w
(
catalog_file
),
info
,
flags
);
if
(
!
ca
||
ca
->
magic
!=
CATADMIN_MAGIC
||
!
info
||
info
->
cbStruct
!=
sizeof
(
*
info
)
||
flags
)
{
...
...
@@ -701,7 +701,7 @@ CRYPTCATMEMBER * WINAPI CryptCATEnumerateMember(HANDLE hCatalog, CRYPTCATMEMBER
if
(
attr
->
cValue
!=
1
)
{
ERR
(
"Can't handle attr->cValue of %u
\n
"
,
attr
->
cValue
);
ERR
(
"Can't handle attr->cValue of %
l
u
\n
"
,
attr
->
cValue
);
continue
;
}
if
(
!
strcmp
(
attr
->
pszObjId
,
CAT_MEMBERINFO_OBJID
))
...
...
@@ -836,7 +836,7 @@ BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO hcatinfo, CATALOG_INFO *info
{
struct
catinfo
*
ci
=
hcatinfo
;
TRACE
(
"%p, %p, %x
\n
"
,
hcatinfo
,
info
,
flags
);
TRACE
(
"%p, %p, %
l
x
\n
"
,
hcatinfo
,
info
,
flags
);
if
(
!
hcatinfo
||
hcatinfo
==
INVALID_HANDLE_VALUE
||
ci
->
magic
!=
CATINFO_MAGIC
||
flags
||
!
info
||
info
->
cbStruct
!=
sizeof
(
*
info
))
...
...
@@ -854,7 +854,7 @@ BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO hcatinfo, CATALOG_INFO *info
CRYPTCATATTRIBUTE
*
WINAPI
CryptCATPutAttrInfo
(
HANDLE
catalog
,
CRYPTCATMEMBER
*
member
,
WCHAR
*
name
,
DWORD
flags
,
DWORD
size
,
BYTE
*
data
)
{
FIXME
(
"catalog %p, member %p, name %s, flags %#
x, size %
u, data %p, stub!
\n
"
,
FIXME
(
"catalog %p, member %p, name %s, flags %#
lx, size %l
u, data %p, stub!
\n
"
,
catalog
,
member
,
debugstr_w
(
name
),
flags
,
size
,
data
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
...
...
@@ -867,7 +867,7 @@ CRYPTCATATTRIBUTE * WINAPI CryptCATPutAttrInfo(HANDLE catalog, CRYPTCATMEMBER *m
CRYPTCATATTRIBUTE
*
WINAPI
CryptCATPutCatAttrInfo
(
HANDLE
catalog
,
WCHAR
*
name
,
DWORD
flags
,
DWORD
size
,
BYTE
*
data
)
{
FIXME
(
"catalog %p, name %s, flags %#
x, size %
u, data %p, stub!
\n
"
,
FIXME
(
"catalog %p, name %s, flags %#
lx, size %l
u, data %p, stub!
\n
"
,
catalog
,
debugstr_w
(
name
),
flags
,
size
,
data
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
...
...
@@ -880,7 +880,7 @@ CRYPTCATATTRIBUTE * WINAPI CryptCATPutCatAttrInfo(HANDLE catalog,
CRYPTCATMEMBER
*
WINAPI
CryptCATPutMemberInfo
(
HANDLE
catalog
,
WCHAR
*
filename
,
WCHAR
*
member
,
GUID
*
subject
,
DWORD
version
,
DWORD
size
,
BYTE
*
data
)
{
FIXME
(
"catalog %p, filename %s, member %s, subject %s, version %
u, size %
u, data %p, stub!
\n
"
,
FIXME
(
"catalog %p, filename %s, member %s, subject %s, version %
lu, size %l
u, data %p, stub!
\n
"
,
catalog
,
debugstr_w
(
filename
),
debugstr_w
(
member
),
debugstr_guid
(
subject
),
version
,
size
,
data
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
...
...
@@ -910,7 +910,7 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
struct
cryptcat
*
cc
;
BOOL
valid
;
TRACE
(
"filename %s, flags %#
x, provider %#lx, version %#x, type %#
x
\n
"
,
TRACE
(
"filename %s, flags %#
lx, provider %#Ix, version %#lx, type %#l
x
\n
"
,
debugstr_w
(
filename
),
flags
,
hProv
,
dwPublicVersion
,
dwEncodingType
);
if
(
!
filename
)
...
...
@@ -1095,7 +1095,7 @@ static BOOL WINTRUST_GetSignedMsgFromPEFile(SIP_SUBJECTINFO *pSubjectInfo,
WIN_CERTIFICATE
*
pCert
=
NULL
;
HANDLE
file
;
TRACE
(
"(%p %p %d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
TRACE
(
"(%p %p %
l
d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
if
(
pSubjectInfo
->
hFile
&&
pSubjectInfo
->
hFile
!=
INVALID_HANDLE_VALUE
)
...
...
@@ -1256,7 +1256,7 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo,
BYTE
buf
[
64
];
DWORD
cert_offset
,
cert_size
,
dwRead
;
TRACE
(
"(%p %p %d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
TRACE
(
"(%p %p %
l
d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
/* get basic offset & size info */
...
...
@@ -1342,9 +1342,9 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo,
}
cert_offset
=
EndGetI32
(
buf
+
cfsigninfo_CertOffset
);
TRACE
(
"cert_offset: %d
\n
"
,
cert_offset
);
TRACE
(
"cert_offset: %
l
d
\n
"
,
cert_offset
);
cert_size
=
EndGetI32
(
buf
+
cfsigninfo_CertSize
);
TRACE
(
"cert_size: %d
\n
"
,
cert_size
);
TRACE
(
"cert_size: %
l
d
\n
"
,
cert_size
);
/* The redundant checks are to avoid wraparound */
if
(
cert_offset
>
cabsize
||
cert_size
>
cabsize
||
...
...
@@ -1394,7 +1394,7 @@ static BOOL WINTRUST_GetSignedMsgFromCatFile(SIP_SUBJECTINFO *pSubjectInfo,
{
BOOL
ret
;
TRACE
(
"(%p %p %d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
TRACE
(
"(%p %p %
l
d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
if
(
!
pbSignedDataMsg
)
...
...
@@ -1439,7 +1439,7 @@ BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pdwEn
{
BOOL
ret
;
TRACE
(
"(%p %p %d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
TRACE
(
"(%p %p %
l
d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
if
(
!
pSubjectInfo
)
...
...
@@ -1474,7 +1474,7 @@ BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pdwEn
BOOL
WINAPI
CryptSIPPutSignedDataMsg
(
SIP_SUBJECTINFO
*
pSubjectInfo
,
DWORD
pdwEncodingType
,
DWORD
*
pdwIndex
,
DWORD
cbSignedDataMsg
,
BYTE
*
pbSignedDataMsg
)
{
TRACE
(
"(%p %
d %p %
d %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
pdwIndex
,
TRACE
(
"(%p %
ld %p %l
d %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
pdwIndex
,
cbSignedDataMsg
,
pbSignedDataMsg
);
if
(
!
pSubjectInfo
)
{
...
...
@@ -1498,7 +1498,7 @@ BOOL WINAPI CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD pdwEnc
BOOL
WINAPI
CryptSIPRemoveSignedDataMsg
(
SIP_SUBJECTINFO
*
pSubjectInfo
,
DWORD
dwIndex
)
{
FIXME
(
"(%p %d) stub
\n
"
,
pSubjectInfo
,
dwIndex
);
FIXME
(
"(%p %
l
d) stub
\n
"
,
pSubjectInfo
,
dwIndex
);
return
FALSE
;
}
...
...
dlls/wintrust/register.c
View file @
9531fede
...
...
@@ -242,7 +242,7 @@ BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
LONG
Res
;
LONG
WriteActionError
=
ERROR_SUCCESS
;
TRACE
(
"%s %x %p
\n
"
,
debugstr_guid
(
pgActionID
),
fdwFlags
,
psProvInfo
);
TRACE
(
"%s %
l
x %p
\n
"
,
debugstr_guid
(
pgActionID
),
fdwFlags
,
psProvInfo
);
/* Some sanity checks.
* We use the W2K3 last error as it makes more sense (W2K leaves the last error
...
...
@@ -1134,7 +1134,7 @@ add_trust_providers:
/* Create a dummy context to force creation of the MachineGuid registry key. */
ret
=
CryptAcquireContextW
(
&
crypt_provider
,
NULL
,
NULL
,
PROV_RSA_FULL
,
CRYPT_VERIFYCONTEXT
);
if
(
ret
)
CryptReleaseContext
(
crypt_provider
,
0
);
else
ERR
(
"Failed to acquire cryptographic context: %u
\n
"
,
GetLastError
());
else
ERR
(
"Failed to acquire cryptographic context: %
l
u
\n
"
,
GetLastError
());
/* If CryptRegisterRes is not S_OK it will always overrule the return value. */
if
(
CryptRegisterRes
!=
S_OK
)
...
...
dlls/wintrust/softpub.c
View file @
9531fede
...
...
@@ -40,7 +40,7 @@ HRESULT WINAPI SoftpubDefCertInit(CRYPT_PROVIDER_DATA *data)
if
(
data
->
padwTrustStepErrors
&&
!
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_WVTINIT
])
ret
=
S_OK
;
TRACE
(
"returning %08x
\n
"
,
ret
);
TRACE
(
"returning %08
l
x
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -53,7 +53,7 @@ HRESULT WINAPI SoftpubInitialize(CRYPT_PROVIDER_DATA *data)
if
(
data
->
padwTrustStepErrors
&&
!
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_WVTINIT
])
ret
=
S_OK
;
TRACE
(
"returning %08x
\n
"
,
ret
);
TRACE
(
"returning %08
l
x
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -100,7 +100,7 @@ static DWORD SOFTPUB_OpenFile(CRYPT_PROVIDER_DATA *data)
if
(
!
err
)
GetFileTime
(
data
->
pWintrustData
->
u
.
pFile
->
hFile
,
&
data
->
sftSystemTime
,
NULL
,
NULL
);
TRACE
(
"returning %d
\n
"
,
err
);
TRACE
(
"returning %
l
d
\n
"
,
err
);
return
err
;
}
...
...
@@ -136,7 +136,7 @@ static DWORD SOFTPUB_GetFileSubject(CRYPT_PROVIDER_DATA *data)
}
else
data
->
u
.
pPDSip
->
gSubject
=
*
data
->
pWintrustData
->
u
.
pFile
->
pgKnownSubject
;
TRACE
(
"returning %d
\n
"
,
err
);
TRACE
(
"returning %
l
d
\n
"
,
err
);
return
err
;
}
...
...
@@ -155,7 +155,7 @@ static DWORD SOFTPUB_GetSIP(CRYPT_PROVIDER_DATA *data)
}
else
err
=
ERROR_OUTOFMEMORY
;
TRACE
(
"returning %d
\n
"
,
err
);
TRACE
(
"returning %
l
d
\n
"
,
err
);
return
err
;
}
...
...
@@ -206,7 +206,7 @@ static DWORD SOFTPUB_GetMessageFromFile(CRYPT_PROVIDER_DATA *data, HANDLE file,
err
=
GetLastError
();
data
->
psPfns
->
pfnFree
(
buf
);
TRACE
(
"returning %d
\n
"
,
err
);
TRACE
(
"returning %
l
d
\n
"
,
err
);
return
err
;
}
...
...
@@ -393,7 +393,7 @@ static DWORD SOFTPUB_CreateStoreFromMessage(CRYPT_PROVIDER_DATA *data)
}
else
err
=
GetLastError
();
TRACE
(
"returning %d
\n
"
,
err
);
TRACE
(
"returning %
l
d
\n
"
,
err
);
return
err
;
}
...
...
@@ -460,7 +460,7 @@ static DWORD SOFTPUB_DecodeInnerContent(CRYPT_PROVIDER_DATA *data)
err
=
GetLastError
();
error:
TRACE
(
"returning %d
\n
"
,
err
);
TRACE
(
"returning %
l
d
\n
"
,
err
);
data
->
psPfns
->
pfnFree
(
oid
);
data
->
psPfns
->
pfnFree
(
buf
);
return
err
;
...
...
@@ -617,13 +617,13 @@ HRESULT WINAPI SoftpubLoadMessage(CRYPT_PROVIDER_DATA *data)
err
=
SOFTPUB_LoadCatalogMessage
(
data
);
break
;
default:
FIXME
(
"unimplemented for %d
\n
"
,
data
->
pWintrustData
->
dwUnionChoice
);
FIXME
(
"unimplemented for %
l
d
\n
"
,
data
->
pWintrustData
->
dwUnionChoice
);
err
=
ERROR_INVALID_PARAMETER
;
}
if
(
err
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]
=
err
;
TRACE
(
"returning %
d (%08
x)
\n
"
,
!
err
?
S_OK
:
S_FALSE
,
TRACE
(
"returning %
ld (%08l
x)
\n
"
,
!
err
?
S_OK
:
S_FALSE
,
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]);
return
!
err
?
S_OK
:
S_FALSE
;
}
...
...
@@ -885,7 +885,7 @@ BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner,
{
BOOL
ret
;
TRACE
(
"(%p, %
d, %d, %
d)
\n
"
,
data
,
idxSigner
,
fCounterSignerChain
,
TRACE
(
"(%p, %
ld, %d, %l
d)
\n
"
,
data
,
idxSigner
,
fCounterSignerChain
,
idxCounterSigner
);
if
(
fCounterSignerChain
)
...
...
@@ -958,7 +958,7 @@ static DWORD WINTRUST_TrustStatusToError(DWORD errorStatus)
error
=
CERT_E_INVALID_POLICY
;
else
if
(
errorStatus
)
{
FIXME
(
"unknown error status %08x
\n
"
,
errorStatus
);
FIXME
(
"unknown error status %08
l
x
\n
"
,
errorStatus
);
error
=
TRUST_E_SYSTEM_ERROR
;
}
else
...
...
@@ -1115,7 +1115,7 @@ HRESULT WINAPI WintrustCertificateTrust(CRYPT_PROVIDER_DATA *data)
}
if
(
err
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]
=
err
;
TRACE
(
"returning %
d (%08
x)
\n
"
,
!
err
?
S_OK
:
S_FALSE
,
TRACE
(
"returning %
ld (%08l
x)
\n
"
,
!
err
?
S_OK
:
S_FALSE
,
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]);
return
!
err
?
S_OK
:
S_FALSE
;
}
...
...
@@ -1162,7 +1162,7 @@ HRESULT WINAPI GenericChainCertificateTrust(CRYPT_PROVIDER_DATA *data)
end:
if
(
err
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]
=
err
;
TRACE
(
"returning %
d (%08
x)
\n
"
,
!
err
?
S_OK
:
S_FALSE
,
TRACE
(
"returning %
ld (%08l
x)
\n
"
,
!
err
?
S_OK
:
S_FALSE
,
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]);
return
!
err
?
S_OK
:
S_FALSE
;
}
...
...
@@ -1175,7 +1175,7 @@ HRESULT WINAPI SoftpubAuthenticode(CRYPT_PROVIDER_DATA *data)
TRACE
(
"(%p)
\n
"
,
data
);
if
(
data
->
pWintrustData
->
dwUIChoice
!=
WTD_UI_NONE
)
FIXME
(
"unimplemented for UI choice %d
\n
"
,
FIXME
(
"unimplemented for UI choice %
l
d
\n
"
,
data
->
pWintrustData
->
dwUIChoice
);
if
(
!
data
->
csSigners
)
{
...
...
@@ -1248,7 +1248,7 @@ HRESULT WINAPI SoftpubAuthenticode(CRYPT_PROVIDER_DATA *data)
if
(
!
ret
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_POLICYPROV
]
=
policyStatus
.
dwError
;
TRACE
(
"returning %
d (%08
x)
\n
"
,
ret
?
S_OK
:
S_FALSE
,
TRACE
(
"returning %
ld (%08l
x)
\n
"
,
ret
?
S_OK
:
S_FALSE
,
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_POLICYPROV
]);
return
ret
?
S_OK
:
S_FALSE
;
}
...
...
@@ -1290,7 +1290,7 @@ HRESULT WINAPI GenericChainFinalProv(CRYPT_PROVIDER_DATA *data)
TRACE
(
"(%p)
\n
"
,
data
);
if
(
data
->
pWintrustData
->
dwUIChoice
!=
WTD_UI_NONE
)
FIXME
(
"unimplemented for UI choice %d
\n
"
,
FIXME
(
"unimplemented for UI choice %
l
d
\n
"
,
data
->
pWintrustData
->
dwUIChoice
);
if
(
!
data
->
csSigners
)
err
=
TRUST_E_NOSIGNATURE
;
...
...
@@ -1343,7 +1343,7 @@ HRESULT WINAPI GenericChainFinalProv(CRYPT_PROVIDER_DATA *data)
}
if
(
err
!=
NO_ERROR
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_POLICYPROV
]
=
err
;
TRACE
(
"returning %
d (%08
x)
\n
"
,
err
==
NO_ERROR
?
S_OK
:
S_FALSE
,
TRACE
(
"returning %
ld (%08l
x)
\n
"
,
err
==
NO_ERROR
?
S_OK
:
S_FALSE
,
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_POLICYPROV
]);
return
err
==
NO_ERROR
?
S_OK
:
S_FALSE
;
}
...
...
dlls/wintrust/wintrust_main.c
View file @
9531fede
...
...
@@ -313,7 +313,7 @@ error:
WINTRUST_Free
(
provData
);
done:
TRACE
(
"returning %08x
\n
"
,
err
);
TRACE
(
"returning %08
l
x
\n
"
,
err
);
return
err
;
}
...
...
@@ -336,7 +336,7 @@ static LONG WINTRUST_DefaultClose(HWND hwnd, GUID *actionID,
WINTRUST_Free
(
provData
);
data
->
hWVTStateData
=
NULL
;
}
TRACE
(
"returning %08x
\n
"
,
err
);
TRACE
(
"returning %08
l
x
\n
"
,
err
);
return
err
;
}
...
...
@@ -349,7 +349,7 @@ static LONG WINTRUST_DefaultVerifyAndClose(HWND hwnd, GUID *actionID,
err
=
WINTRUST_DefaultVerify
(
hwnd
,
actionID
,
data
);
WINTRUST_DefaultClose
(
hwnd
,
actionID
,
data
);
TRACE
(
"returning %08x
\n
"
,
err
);
TRACE
(
"returning %08
l
x
\n
"
,
err
);
return
err
;
}
...
...
@@ -444,7 +444,7 @@ static HRESULT WINAPI WINTRUST_CertVerifyObjTrust(CRYPT_PROVIDER_DATA *data)
}
break
;
default:
FIXME
(
"unimplemented for %d
\n
"
,
data
->
pWintrustData
->
dwUnionChoice
);
FIXME
(
"unimplemented for %
l
d
\n
"
,
data
->
pWintrustData
->
dwUnionChoice
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALSE
;
}
...
...
@@ -453,7 +453,7 @@ error:
if
(
!
ret
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]
=
GetLastError
();
TRACE
(
"returning %
d (%08
x)
\n
"
,
ret
?
S_OK
:
S_FALSE
,
TRACE
(
"returning %
ld (%08l
x)
\n
"
,
ret
?
S_OK
:
S_FALSE
,
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_OBJPROV
]);
return
ret
?
S_OK
:
S_FALSE
;
}
...
...
@@ -504,7 +504,7 @@ error:
WINTRUST_Free
(
provData
);
done:
TRACE
(
"returning %08x
\n
"
,
err
);
TRACE
(
"returning %08
l
x
\n
"
,
err
);
return
err
;
}
...
...
@@ -517,7 +517,7 @@ static LONG WINTRUST_CertVerifyAndClose(HWND hwnd, GUID *actionID,
err
=
WINTRUST_CertVerify
(
hwnd
,
actionID
,
data
);
WINTRUST_DefaultClose
(
hwnd
,
actionID
,
data
);
TRACE
(
"returning %08x
\n
"
,
err
);
TRACE
(
"returning %08
l
x
\n
"
,
err
);
return
err
;
}
...
...
@@ -546,7 +546,7 @@ static LONG WINTRUST_CertActionVerify(HWND hwnd, GUID *actionID,
err
=
WINTRUST_DefaultClose
(
hwnd
,
actionID
,
data
);
break
;
default:
FIXME
(
"unimplemented for %d
\n
"
,
data
->
dwStateAction
);
FIXME
(
"unimplemented for %
l
d
\n
"
,
data
->
dwStateAction
);
}
return
err
;
}
...
...
@@ -556,7 +556,7 @@ static void dump_file_info(WINTRUST_FILE_INFO *pFile)
TRACE
(
"%p
\n
"
,
pFile
);
if
(
pFile
)
{
TRACE
(
"cbStruct: %d
\n
"
,
pFile
->
cbStruct
);
TRACE
(
"cbStruct: %
l
d
\n
"
,
pFile
->
cbStruct
);
TRACE
(
"pcwszFilePath: %s
\n
"
,
debugstr_w
(
pFile
->
pcwszFilePath
));
TRACE
(
"hFile: %p
\n
"
,
pFile
->
hFile
);
TRACE
(
"pgKnownSubject: %s
\n
"
,
debugstr_guid
(
pFile
->
pgKnownSubject
));
...
...
@@ -568,8 +568,8 @@ static void dump_catalog_info(WINTRUST_CATALOG_INFO *catalog)
TRACE
(
"%p
\n
"
,
catalog
);
if
(
catalog
)
{
TRACE
(
"cbStruct: %d
\n
"
,
catalog
->
cbStruct
);
TRACE
(
"dwCatalogVersion: %d
\n
"
,
catalog
->
dwCatalogVersion
);
TRACE
(
"cbStruct: %
l
d
\n
"
,
catalog
->
cbStruct
);
TRACE
(
"dwCatalogVersion: %
l
d
\n
"
,
catalog
->
dwCatalogVersion
);
TRACE
(
"pcwszCatalogFilePath: %s
\n
"
,
debugstr_w
(
catalog
->
pcwszCatalogFilePath
));
TRACE
(
"pcwszMemberTag: %s
\n
"
,
debugstr_w
(
catalog
->
pcwszMemberTag
));
...
...
@@ -577,7 +577,7 @@ static void dump_catalog_info(WINTRUST_CATALOG_INFO *catalog)
debugstr_w
(
catalog
->
pcwszMemberFilePath
));
TRACE
(
"hMemberFile: %p
\n
"
,
catalog
->
hMemberFile
);
TRACE
(
"pbCalculatedFileHash: %p
\n
"
,
catalog
->
pbCalculatedFileHash
);
TRACE
(
"cbCalculatedFileHash: %d
\n
"
,
catalog
->
cbCalculatedFileHash
);
TRACE
(
"cbCalculatedFileHash: %
l
d
\n
"
,
catalog
->
cbCalculatedFileHash
);
TRACE
(
"pcCatalogContext: %p
\n
"
,
catalog
->
pcCatalogContext
);
}
}
...
...
@@ -587,12 +587,12 @@ static void dump_blob_info(WINTRUST_BLOB_INFO *blob)
TRACE
(
"%p
\n
"
,
blob
);
if
(
blob
)
{
TRACE
(
"cbStruct: %d
\n
"
,
blob
->
cbStruct
);
TRACE
(
"cbStruct: %
l
d
\n
"
,
blob
->
cbStruct
);
TRACE
(
"gSubject: %s
\n
"
,
debugstr_guid
(
&
blob
->
gSubject
));
TRACE
(
"pcwszDisplayName: %s
\n
"
,
debugstr_w
(
blob
->
pcwszDisplayName
));
TRACE
(
"cbMemObject: %d
\n
"
,
blob
->
cbMemObject
);
TRACE
(
"cbMemObject: %
l
d
\n
"
,
blob
->
cbMemObject
);
TRACE
(
"pbMemObject: %p
\n
"
,
blob
->
pbMemObject
);
TRACE
(
"cbMemSignedMsg: %d
\n
"
,
blob
->
cbMemSignedMsg
);
TRACE
(
"cbMemSignedMsg: %
l
d
\n
"
,
blob
->
cbMemSignedMsg
);
TRACE
(
"pbMemSignedMsg: %p
\n
"
,
blob
->
pbMemSignedMsg
);
}
}
...
...
@@ -602,10 +602,10 @@ static void dump_sgnr_info(WINTRUST_SGNR_INFO *sgnr)
TRACE
(
"%p
\n
"
,
sgnr
);
if
(
sgnr
)
{
TRACE
(
"cbStruct: %d
\n
"
,
sgnr
->
cbStruct
);
TRACE
(
"cbStruct: %
l
d
\n
"
,
sgnr
->
cbStruct
);
TRACE
(
"pcwszDisplayName: %s
\n
"
,
debugstr_w
(
sgnr
->
pcwszDisplayName
));
TRACE
(
"psSignerInfo: %p
\n
"
,
sgnr
->
psSignerInfo
);
TRACE
(
"chStores: %d
\n
"
,
sgnr
->
chStores
);
TRACE
(
"chStores: %
l
d
\n
"
,
sgnr
->
chStores
);
}
}
...
...
@@ -614,11 +614,11 @@ static void dump_cert_info(WINTRUST_CERT_INFO *cert)
TRACE
(
"%p
\n
"
,
cert
);
if
(
cert
)
{
TRACE
(
"cbStruct: %d
\n
"
,
cert
->
cbStruct
);
TRACE
(
"cbStruct: %
l
d
\n
"
,
cert
->
cbStruct
);
TRACE
(
"pcwszDisplayName: %s
\n
"
,
debugstr_w
(
cert
->
pcwszDisplayName
));
TRACE
(
"psCertContext: %p
\n
"
,
cert
->
psCertContext
);
TRACE
(
"chStores: %d
\n
"
,
cert
->
chStores
);
TRACE
(
"dwFlags: %08x
\n
"
,
cert
->
dwFlags
);
TRACE
(
"chStores: %
l
d
\n
"
,
cert
->
chStores
);
TRACE
(
"dwFlags: %08
l
x
\n
"
,
cert
->
dwFlags
);
TRACE
(
"psftVerifyAsOf: %p
\n
"
,
cert
->
psftVerifyAsOf
);
}
}
...
...
@@ -628,12 +628,12 @@ static void dump_wintrust_data(WINTRUST_DATA *data)
TRACE
(
"%p
\n
"
,
data
);
if
(
data
)
{
TRACE
(
"cbStruct: %d
\n
"
,
data
->
cbStruct
);
TRACE
(
"cbStruct: %
l
d
\n
"
,
data
->
cbStruct
);
TRACE
(
"pPolicyCallbackData: %p
\n
"
,
data
->
pPolicyCallbackData
);
TRACE
(
"pSIPClientData: %p
\n
"
,
data
->
pSIPClientData
);
TRACE
(
"dwUIChoice: %d
\n
"
,
data
->
dwUIChoice
);
TRACE
(
"fdwRevocationChecks: %08x
\n
"
,
data
->
fdwRevocationChecks
);
TRACE
(
"dwUnionChoice: %d
\n
"
,
data
->
dwUnionChoice
);
TRACE
(
"dwUIChoice: %
l
d
\n
"
,
data
->
dwUIChoice
);
TRACE
(
"fdwRevocationChecks: %08
l
x
\n
"
,
data
->
fdwRevocationChecks
);
TRACE
(
"dwUnionChoice: %
l
d
\n
"
,
data
->
dwUnionChoice
);
switch
(
data
->
dwUnionChoice
)
{
case
WTD_CHOICE_FILE
:
...
...
@@ -652,11 +652,11 @@ static void dump_wintrust_data(WINTRUST_DATA *data)
dump_cert_info
(
data
->
u
.
pCert
);
break
;
}
TRACE
(
"dwStateAction: %d
\n
"
,
data
->
dwStateAction
);
TRACE
(
"dwStateAction: %
l
d
\n
"
,
data
->
dwStateAction
);
TRACE
(
"hWVTStateData: %p
\n
"
,
data
->
hWVTStateData
);
TRACE
(
"pwszURLReference: %s
\n
"
,
debugstr_w
(
data
->
pwszURLReference
));
TRACE
(
"dwProvFlags: %08x
\n
"
,
data
->
dwProvFlags
);
TRACE
(
"dwUIContext: %d
\n
"
,
data
->
dwUIContext
);
TRACE
(
"dwProvFlags: %08
l
x
\n
"
,
data
->
dwProvFlags
);
TRACE
(
"dwUIContext: %
l
d
\n
"
,
data
->
dwUIContext
);
}
}
...
...
@@ -728,12 +728,12 @@ LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, LPVOID ActionData )
err
=
WINTRUST_DefaultClose
(
hwnd
,
ActionID
,
ActionData
);
break
;
default:
FIXME
(
"unimplemented for %d
\n
"
,
actionData
->
dwStateAction
);
FIXME
(
"unimplemented for %
l
d
\n
"
,
actionData
->
dwStateAction
);
}
}
if
(
err
)
SetLastError
(
err
);
TRACE
(
"returning %08x
\n
"
,
err
);
TRACE
(
"returning %08
l
x
\n
"
,
err
);
return
err
;
}
...
...
@@ -755,7 +755,7 @@ CRYPT_PROVIDER_SGNR * WINAPI WTHelperGetProvSignerFromChain(
{
CRYPT_PROVIDER_SGNR
*
sgnr
;
TRACE
(
"(%p %
d %d %
d)
\n
"
,
pProvData
,
idxSigner
,
fCounterSigner
,
TRACE
(
"(%p %
ld %d %l
d)
\n
"
,
pProvData
,
idxSigner
,
fCounterSigner
,
idxCounterSigner
);
if
(
idxSigner
>=
pProvData
->
csSigners
||
!
pProvData
->
pasSigners
)
...
...
@@ -780,7 +780,7 @@ CRYPT_PROVIDER_CERT * WINAPI WTHelperGetProvCertFromChain(
{
CRYPT_PROVIDER_CERT
*
cert
;
TRACE
(
"(%p %d)
\n
"
,
pSgnr
,
idxCert
);
TRACE
(
"(%p %
l
d)
\n
"
,
pSgnr
,
idxCert
);
if
(
idxCert
>=
pSgnr
->
csCertChain
||
!
pSgnr
->
pasCertChain
)
return
NULL
;
...
...
@@ -898,7 +898,7 @@ BOOL WINAPI WTHelperGetKnownUsages(DWORD action, PCCRYPT_OID_INFO **usages)
{
BOOL
ret
;
TRACE
(
"(%d, %p)
\n
"
,
action
,
usages
);
TRACE
(
"(%
l
d, %p)
\n
"
,
action
,
usages
);
if
(
!
usages
)
{
...
...
@@ -920,7 +920,7 @@ BOOL WINAPI WTHelperGetKnownUsages(DWORD action, PCCRYPT_OID_INFO **usages)
}
else
{
WARN
(
"unknown action %d
\n
"
,
action
);
WARN
(
"unknown action %
l
d
\n
"
,
action
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALSE
;
}
...
...
@@ -979,7 +979,7 @@ BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
HKEY
key
;
LONG
r
;
TRACE
(
"%x
\n
"
,
dwPolicyFlags
);
TRACE
(
"%
l
x
\n
"
,
dwPolicyFlags
);
r
=
RegCreateKeyExW
(
HKEY_CURRENT_USER
,
Software_Publishing
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
key
,
NULL
);
...
...
@@ -1024,7 +1024,7 @@ BOOL WINAPI WINTRUST_AddSgnr(CRYPT_PROVIDER_DATA *data,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(%p, %d, %d, %p)
\n
"
,
data
,
fCounterSigner
,
idxSigner
,
sgnr
);
TRACE
(
"(%p, %d, %
l
d, %p)
\n
"
,
data
,
fCounterSigner
,
idxSigner
,
sgnr
);
if
(
sgnr
->
cbStruct
>
sizeof
(
CRYPT_PROVIDER_SGNR
))
{
...
...
@@ -1077,7 +1077,7 @@ BOOL WINAPI WINTRUST_AddCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner,
{
BOOL
ret
=
FALSE
;
TRACE
(
"(%p, %
d, %d, %
d, %p)
\n
"
,
data
,
idxSigner
,
fCounterSigner
,
TRACE
(
"(%p, %
ld, %d, %l
d, %p)
\n
"
,
data
,
idxSigner
,
fCounterSigner
,
idxSigner
,
pCert2Add
);
if
(
fCounterSigner
)
...
...
@@ -1205,7 +1205,7 @@ HRESULT WINAPI FindCertsByIssuer(PCERT_CHAIN pCertChains, DWORD *pcbCertChains,
DWORD
*
pcCertChains
,
BYTE
*
pbEncodedIssuerName
,
DWORD
cbEncodedIssuerName
,
LPCWSTR
pwszPurpose
,
DWORD
dwKeySpec
)
{
FIXME
(
"(%p, %p, %p, %p, %
d, %s, %
d): stub
\n
"
,
pCertChains
,
pcbCertChains
,
FIXME
(
"(%p, %p, %p, %p, %
ld, %s, %l
d): stub
\n
"
,
pCertChains
,
pcbCertChains
,
pcCertChains
,
pbEncodedIssuerName
,
cbEncodedIssuerName
,
debugstr_w
(
pwszPurpose
),
dwKeySpec
);
return
E_FAIL
;
...
...
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