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
8a281038
Commit
8a281038
authored
Jun 27, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57d5db5d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
31 deletions
+27
-31
Makefile.in
dlls/wintrust/Makefile.in
+2
-0
asn.c
dlls/wintrust/asn.c
+0
-3
crypt.c
dlls/wintrust/crypt.c
+25
-26
wintrust_main.c
dlls/wintrust/wintrust_main.c
+0
-2
No files found.
dlls/wintrust/Makefile.in
View file @
8a281038
...
...
@@ -3,6 +3,8 @@ IMPORTLIB = wintrust
IMPORTS
=
crypt32 user32 advapi32
DELAYIMPORTS
=
cryptui imagehlp
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
asn.c
\
crypt.c
\
...
...
dlls/wintrust/asn.c
View file @
8a281038
...
...
@@ -18,9 +18,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
...
...
dlls/wintrust/crypt.c
View file @
8a281038
...
...
@@ -33,7 +33,6 @@
#include "winternl.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wintrust
);
...
...
@@ -75,7 +74,7 @@ static HCATINFO create_catinfo(const WCHAR *filename)
SetLastError
(
ERROR_OUTOFMEMORY
);
return
INVALID_HANDLE_VALUE
;
}
strcpyW
(
ci
->
file
,
filename
);
l
strcpyW
(
ci
->
file
,
filename
);
ci
->
magic
=
CATINFO_MAGIC
;
return
ci
;
}
...
...
@@ -125,13 +124,13 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin,
}
GetSystemDirectoryW
(
catroot_dir
,
MAX_PATH
);
strcatW
(
catroot_dir
,
catroot
);
l
strcatW
(
catroot_dir
,
catroot
);
/* create the directory if it doesn't exist */
CreateDirectoryW
(
catroot_dir
,
NULL
);
if
(
!
sys
)
sys
=
&
defsys
;
s
printfW
(
ca
->
path
,
fmt
,
catroot_dir
,
sys
->
Data1
,
sys
->
Data2
,
s
wprintf
(
ca
->
path
,
ARRAY_SIZE
(
ca
->
path
)
,
fmt
,
catroot_dir
,
sys
->
Data1
,
sys
->
Data2
,
sys
->
Data3
,
sys
->
Data4
[
0
],
sys
->
Data4
[
1
],
sys
->
Data4
[
2
],
sys
->
Data4
[
3
],
sys
->
Data4
[
4
],
sys
->
Data4
[
5
],
sys
->
Data4
[
6
],
sys
->
Data4
[
7
]);
...
...
@@ -184,15 +183,15 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile,
return
NULL
;
}
len
=
strlenW
(
ca
->
path
)
+
strlenW
(
selectBaseName
)
+
2
;
len
=
lstrlenW
(
ca
->
path
)
+
l
strlenW
(
selectBaseName
)
+
2
;
if
(
!
(
target
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
{
SetLastError
(
ERROR_OUTOFMEMORY
);
return
NULL
;
}
strcpyW
(
target
,
ca
->
path
);
strcatW
(
target
,
slashW
);
strcatW
(
target
,
selectBaseName
);
l
strcpyW
(
target
,
ca
->
path
);
l
strcatW
(
target
,
slashW
);
l
strcatW
(
target
,
selectBaseName
);
if
(
!
CopyFileW
(
catalogFile
,
target
,
FALSE
))
{
...
...
@@ -208,7 +207,7 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile,
return
NULL
;
}
ci
->
magic
=
CATINFO_MAGIC
;
strcpyW
(
ci
->
file
,
target
);
l
strcpyW
(
ci
->
file
,
target
);
HeapFree
(
GetProcessHeap
(),
0
,
target
);
return
ci
;
...
...
@@ -308,15 +307,15 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
{
WCHAR
*
path
;
size
=
strlenW
(
ca
->
path
)
*
sizeof
(
WCHAR
)
+
sizeof
(
globW
);
size
=
l
strlenW
(
ca
->
path
)
*
sizeof
(
WCHAR
)
+
sizeof
(
globW
);
if
(
!
(
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
{
CryptReleaseContext
(
prov
,
0
);
SetLastError
(
ERROR_OUTOFMEMORY
);
return
NULL
;
}
strcpyW
(
path
,
ca
->
path
);
strcatW
(
path
,
globW
);
l
strcpyW
(
path
,
ca
->
path
);
l
strcatW
(
path
,
globW
);
FindClose
(
ca
->
find
);
ca
->
find
=
FindFirstFileW
(
path
,
&
data
);
...
...
@@ -342,15 +341,15 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
struct
catinfo
*
ci
;
HANDLE
hcat
;
size
=
(
strlenW
(
ca
->
path
)
+
strlenW
(
data
.
cFileName
)
+
2
)
*
sizeof
(
WCHAR
);
size
=
(
lstrlenW
(
ca
->
path
)
+
l
strlenW
(
data
.
cFileName
)
+
2
)
*
sizeof
(
WCHAR
);
if
(
!
(
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
{
SetLastError
(
ERROR_OUTOFMEMORY
);
return
NULL
;
}
strcpyW
(
filename
,
ca
->
path
);
strcatW
(
filename
,
slashW
);
strcatW
(
filename
,
data
.
cFileName
);
l
strcpyW
(
filename
,
ca
->
path
);
l
strcatW
(
filename
,
slashW
);
l
strcatW
(
filename
,
data
.
cFileName
);
hcat
=
CryptCATOpen
(
filename
,
CRYPTCAT_OPEN_EXISTING
,
prov
,
0
,
0
);
if
(
hcat
==
INVALID_HANDLE_VALUE
)
...
...
@@ -487,22 +486,22 @@ BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN hCatAdmin, LPCWSTR pwszCatalogF
/* Only delete when there is a filename and no path */
if
(
pwszCatalogFile
&&
pwszCatalogFile
[
0
]
!=
0
&&
!
strchrW
(
pwszCatalogFile
,
'\\'
)
&&
!
strchrW
(
pwszCatalogFile
,
'/'
)
&&
!
strchrW
(
pwszCatalogFile
,
':'
))
!
wcschr
(
pwszCatalogFile
,
'\\'
)
&&
!
wcschr
(
pwszCatalogFile
,
'/'
)
&&
!
wcschr
(
pwszCatalogFile
,
':'
))
{
static
const
WCHAR
slashW
[]
=
{
'\\'
,
0
};
WCHAR
*
target
;
DWORD
len
;
len
=
strlenW
(
ca
->
path
)
+
strlenW
(
pwszCatalogFile
)
+
2
;
len
=
lstrlenW
(
ca
->
path
)
+
l
strlenW
(
pwszCatalogFile
)
+
2
;
if
(
!
(
target
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
{
SetLastError
(
ERROR_OUTOFMEMORY
);
return
FALSE
;
}
strcpyW
(
target
,
ca
->
path
);
strcatW
(
target
,
slashW
);
strcatW
(
target
,
pwszCatalogFile
);
l
strcpyW
(
target
,
ca
->
path
);
l
strcatW
(
target
,
slashW
);
l
strcatW
(
target
,
pwszCatalogFile
);
DeleteFileW
(
target
);
...
...
@@ -528,9 +527,9 @@ BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN hcatadmin, WCHAR *catalog_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
strcpyW
(
info
->
wszCatalogFile
,
ca
->
path
);
strcatW
(
info
->
wszCatalogFile
,
slashW
);
strcatW
(
info
->
wszCatalogFile
,
catalog_file
);
l
strcpyW
(
info
->
wszCatalogFile
,
ca
->
path
);
l
strcatW
(
info
->
wszCatalogFile
,
slashW
);
l
strcatW
(
info
->
wszCatalogFile
,
catalog_file
);
return
TRUE
;
}
...
...
@@ -845,7 +844,7 @@ BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO hcatinfo, CATALOG_INFO *info
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
strcpyW
(
info
->
wszCatalogFile
,
ci
->
file
);
l
strcpyW
(
info
->
wszCatalogFile
,
ci
->
file
);
return
TRUE
;
}
...
...
dlls/wintrust/wintrust_main.c
View file @
8a281038
...
...
@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define NONAMELESSUNION
...
...
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