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
38173043
Commit
38173043
authored
May 29, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptdlg: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bf1bebc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
94 deletions
+93
-94
Makefile.in
dlls/cryptdlg/Makefile.in
+2
-0
main.c
dlls/cryptdlg/main.c
+91
-94
No files found.
dlls/cryptdlg/Makefile.in
View file @
38173043
MODULE
=
cryptdlg.dll
IMPORTS
=
cryptui crypt32 wintrust user32 advapi32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
main.c
...
...
dlls/cryptdlg/main.c
View file @
38173043
...
...
@@ -18,8 +18,6 @@
#define NONAMELESSUNION
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -33,7 +31,6 @@
#include "cryptdlg.h"
#include "cryptuiapi.h"
#include "cryptres.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
cryptdlg
);
...
...
@@ -501,9 +498,9 @@ static BOOL CRYPT_FormatHexString(const BYTE *pbEncoded, DWORD cbEncoded,
for
(
i
=
0
;
i
<
cbEncoded
;
i
++
)
{
if
(
i
<
cbEncoded
-
1
)
ptr
+=
s
printfW
(
ptr
,
fmt
,
pbEncoded
[
i
]);
ptr
+=
s
wprintf
(
ptr
,
4
,
fmt
,
pbEncoded
[
i
]);
else
ptr
+=
s
printfW
(
ptr
,
endFmt
,
pbEncoded
[
i
]);
ptr
+=
s
wprintf
(
ptr
,
3
,
endFmt
,
pbEncoded
[
i
]);
}
}
else
...
...
@@ -538,31 +535,31 @@ static BOOL CRYPT_FormatCPS(DWORD dwCertEncodingType,
else
sep
=
commaSep
;
sepLen
=
strlenW
(
sep
);
sepLen
=
l
strlenW
(
sep
);
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
3
*
strlenW
(
indent
);
charsNeeded
+=
3
*
l
strlenW
(
indent
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
cpsValue
->
Value
.
cbData
/
sizeof
(
WCHAR
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
(
LPWSTR
)
cpsValue
->
Value
.
pbData
);
l
strcpyW
(
str
,
(
LPWSTR
)
cpsValue
->
Value
.
pbData
);
str
+=
cpsValue
->
Value
.
cbData
/
sizeof
(
WCHAR
);
}
charsNeeded
+=
sepLen
;
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
sep
);
l
strcpyW
(
str
,
sep
);
str
+=
sepLen
;
}
LocalFree
(
cpsValue
);
...
...
@@ -619,8 +616,8 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType,
headingSep
=
colonSpace
;
sep
=
commaSep
;
}
sepLen
=
strlenW
(
sep
);
headingSepLen
=
strlenW
(
headingSep
);
sepLen
=
l
strlenW
(
sep
);
headingSepLen
=
l
strlenW
(
headingSep
);
if
(
pNoticeRef
)
{
...
...
@@ -629,15 +626,15 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType,
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
3
*
strlenW
(
indent
);
charsNeeded
+=
3
*
l
strlenW
(
indent
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
noticeRefLen
;
...
...
@@ -649,22 +646,22 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType,
charsNeeded
+=
headingSepLen
;
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
headingSep
);
l
strcpyW
(
str
,
headingSep
);
str
+=
headingSepLen
;
}
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
4
*
strlenW
(
indent
);
charsNeeded
+=
4
*
l
strlenW
(
indent
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
organizationLen
;
...
...
@@ -681,24 +678,24 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType,
charsNeeded
+=
sepLen
;
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
sep
);
l
strcpyW
(
str
,
sep
);
str
+=
sepLen
;
}
for
(
k
=
0
;
k
<
pNoticeRef
->
cNoticeNumbers
;
k
++
)
{
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
4
*
strlenW
(
indent
);
charsNeeded
+=
4
*
l
strlenW
(
indent
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
noticeNumLen
;
...
...
@@ -707,17 +704,17 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType,
memcpy
(
str
,
noticeNum
,
noticeNumLen
*
sizeof
(
WCHAR
));
str
+=
noticeNumLen
;
}
s
printfW
(
noticeNumStr
,
numFmt
,
k
+
1
);
charsNeeded
+=
strlenW
(
noticeNumStr
);
s
wprintf
(
noticeNumStr
,
ARRAY_SIZE
(
noticeNumStr
)
,
numFmt
,
k
+
1
);
charsNeeded
+=
l
strlenW
(
noticeNumStr
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
noticeNumStr
);
str
+=
strlenW
(
noticeNumStr
);
l
strcpyW
(
str
,
noticeNumStr
);
str
+=
l
strlenW
(
noticeNumStr
);
}
charsNeeded
+=
sepLen
;
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
sep
);
l
strcpyW
(
str
,
sep
);
str
+=
sepLen
;
}
}
...
...
@@ -726,15 +723,15 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType,
{
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
3
*
strlenW
(
indent
);
charsNeeded
+=
3
*
l
strlenW
(
indent
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
noticeTextLen
;
...
...
@@ -743,16 +740,16 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType,
memcpy
(
str
,
noticeText
,
noticeTextLen
*
sizeof
(
WCHAR
));
str
+=
noticeTextLen
;
}
charsNeeded
+=
strlenW
(
notice
->
pszDisplayText
);
charsNeeded
+=
l
strlenW
(
notice
->
pszDisplayText
);
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
notice
->
pszDisplayText
);
str
+=
strlenW
(
notice
->
pszDisplayText
);
l
strcpyW
(
str
,
notice
->
pszDisplayText
);
str
+=
l
strlenW
(
notice
->
pszDisplayText
);
}
charsNeeded
+=
sepLen
;
if
(
str
&&
*
pcchStr
>=
charsNeeded
)
{
strcpyW
(
str
,
sep
);
l
strcpyW
(
str
,
sep
);
str
+=
sepLen
;
}
}
...
...
@@ -826,8 +823,8 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
headingSep
=
colonSpace
;
sep
=
commaSep
;
}
sepLen
=
strlenW
(
sep
);
headingSepLen
=
strlenW
(
headingSep
);
sepLen
=
l
strlenW
(
sep
);
headingSepLen
=
l
strlenW
(
headingSep
);
for
(
i
=
0
;
ret
&&
i
<
policies
->
cPolicyInfo
;
i
++
)
{
...
...
@@ -838,12 +835,12 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
charsNeeded
+=
1
;
/* '['*/
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
*
str
++
=
'['
;
s
printfW
(
policyNum
,
numFmt
,
i
+
1
);
charsNeeded
+=
strlenW
(
policyNum
);
s
wprintf
(
policyNum
,
ARRAY_SIZE
(
policyNum
)
,
numFmt
,
i
+
1
);
charsNeeded
+=
l
strlenW
(
policyNum
);
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
policyNum
);
str
+=
strlenW
(
policyNum
);
l
strcpyW
(
str
,
policyNum
);
str
+=
l
strlenW
(
policyNum
);
}
charsNeeded
+=
1
;
/* ']'*/
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
...
...
@@ -857,16 +854,16 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
charsNeeded
+=
headingSepLen
;
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
headingSep
);
l
strcpyW
(
str
,
headingSep
);
str
+=
headingSepLen
;
}
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
strlenW
(
indent
);
charsNeeded
+=
l
strlenW
(
indent
);
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
policyIdLen
;
...
...
@@ -885,7 +882,7 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
charsNeeded
+=
sepLen
;
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
sep
);
l
strcpyW
(
str
,
sep
);
str
+=
sepLen
;
}
for
(
j
=
0
;
j
<
policy
->
cPolicyQualifier
;
j
++
)
...
...
@@ -896,31 +893,31 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
strlenW
(
indent
);
charsNeeded
+=
l
strlenW
(
indent
);
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
1
;
/* '['*/
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
*
str
++
=
'['
;
charsNeeded
+=
strlenW
(
policyNum
);
charsNeeded
+=
l
strlenW
(
policyNum
);
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
policyNum
);
str
+=
strlenW
(
policyNum
);
l
strcpyW
(
str
,
policyNum
);
str
+=
l
strlenW
(
policyNum
);
}
charsNeeded
+=
1
;
/* ','*/
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
*
str
++
=
','
;
s
printfW
(
policyQualifierNum
,
numFmt
,
j
+
1
);
charsNeeded
+=
strlenW
(
policyQualifierNum
);
s
wprintf
(
policyQualifierNum
,
ARRAY_SIZE
(
policyQualifierNum
)
,
numFmt
,
j
+
1
);
charsNeeded
+=
l
strlenW
(
policyQualifierNum
);
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
policyQualifierNum
);
str
+=
strlenW
(
policyQualifierNum
);
l
strcpyW
(
str
,
policyQualifierNum
);
str
+=
l
strlenW
(
policyQualifierNum
);
}
charsNeeded
+=
1
;
/* ']'*/
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
...
...
@@ -935,18 +932,18 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
charsNeeded
+=
headingSepLen
;
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
headingSep
);
l
strcpyW
(
str
,
headingSep
);
str
+=
headingSepLen
;
}
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
2
*
strlenW
(
indent
);
charsNeeded
+=
2
*
l
strlenW
(
indent
);
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
policyQualifierIdLen
;
...
...
@@ -989,18 +986,18 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
charsNeeded
+=
sepLen
;
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
sep
);
l
strcpyW
(
str
,
sep
);
str
+=
sepLen
;
}
if
(
dwFormatStrType
&
CRYPT_FORMAT_STR_MULTI_LINE
)
{
charsNeeded
+=
2
*
strlenW
(
indent
);
charsNeeded
+=
2
*
l
strlenW
(
indent
);
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
strcpyW
(
str
,
indent
);
str
+=
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
l
strcpyW
(
str
,
indent
);
str
+=
l
strlenW
(
indent
);
}
}
charsNeeded
+=
qualifierLen
;
...
...
@@ -1012,7 +1009,7 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType,
charsNeeded
+=
headingSepLen
;
if
(
str
&&
*
pcbFormat
>=
charsNeeded
*
sizeof
(
WCHAR
))
{
strcpyW
(
str
,
headingSep
);
l
strcpyW
(
str
,
headingSep
);
str
+=
headingSepLen
;
}
/* This if block is deliberately redundant with the same if
...
...
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