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
183df56c
Commit
183df56c
authored
Dec 22, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui: Separate opening a file from importing it.
parent
9169e6ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
main.c
dlls/cryptui/main.c
+16
-7
No files found.
dlls/cryptui/main.c
View file @
183df56c
...
...
@@ -3627,12 +3627,10 @@ static BOOL import_store(DWORD dwFlags, HWND hwnd, LPCWSTR szTitle,
return
ret
;
}
static
BOOL
import_file
(
DWORD
dwFlags
,
HWND
hwnd
,
LPCWSTR
szTitle
,
LPCWSTR
fileName
,
HCERTSTORE
dest
)
static
HCERTSTORE
open_store_from_file
(
DWORD
dwFlags
,
LPCWSTR
fileName
)
{
HCERTSTORE
s
ource
;
HCERTSTORE
s
tore
=
NULL
;
DWORD
contentType
,
expectedContentTypeFlags
;
BOOL
ret
;
if
(
dwFlags
&
(
CRYPTUI_WIZ_IMPORT_ALLOW_CERT
|
CRYPTUI_WIZ_IMPORT_ALLOW_CRL
|
...
...
@@ -3667,14 +3665,25 @@ static BOOL import_file(DWORD dwFlags, HWND hwnd, LPCWSTR szTitle,
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
|
CERT_QUERY_CONTENT_FLAG_PFX
;
ret
=
CryptQueryObject
(
CERT_QUERY_OBJECT_FILE
,
fileName
,
CryptQueryObject
(
CERT_QUERY_OBJECT_FILE
,
fileName
,
expectedContentTypeFlags
,
CERT_QUERY_FORMAT_FLAG_ALL
,
0
,
NULL
,
&
contentType
,
NULL
,
&
source
,
NULL
,
NULL
);
if
(
ret
)
&
contentType
,
NULL
,
&
store
,
NULL
,
NULL
);
return
store
;
}
static
BOOL
import_file
(
DWORD
dwFlags
,
HWND
hwnd
,
LPCWSTR
szTitle
,
LPCWSTR
fileName
,
HCERTSTORE
dest
)
{
HCERTSTORE
source
;
BOOL
ret
;
if
((
source
=
open_store_from_file
(
dwFlags
,
fileName
)))
{
ret
=
import_store
(
dwFlags
,
hwnd
,
szTitle
,
source
,
dest
);
CertCloseStore
(
source
,
0
);
}
else
ret
=
FALSE
;
return
ret
;
}
...
...
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