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
56215060
Commit
56215060
authored
Jan 23, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Jan 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui: Implement CryptUIWizExport for the no UI case.
parent
40905e42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
20 deletions
+29
-20
main.c
dlls/cryptui/main.c
+29
-20
No files found.
dlls/cryptui/main.c
View file @
56215060
...
...
@@ -6097,42 +6097,41 @@ static BOOL save_cms(HANDLE file, PCCRYPTUI_WIZ_EXPORT_INFO pExportInfo,
return
ret
;
}
static
BOOL
do_export
(
struct
ExportWizData
*
data
)
static
BOOL
do_export
(
HANDLE
file
,
PCCRYPTUI_WIZ_EXPORT_INFO
pExportInfo
,
PCCRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO
pContextInfo
)
{
BOOL
ret
;
switch
(
data
->
pExportInfo
->
dwSubjectChoice
)
switch
(
pExportInfo
->
dwSubjectChoice
)
{
case
CRYPTUI_WIZ_EXPORT_CRL_CONTEXT
:
ret
=
save_der
(
data
->
file
,
data
->
pExportInfo
->
u
.
pCRLContext
->
pbCrlEncoded
,
data
->
pExportInfo
->
u
.
pCRLContext
->
cbCrlEncoded
);
ret
=
save_der
(
file
,
pExportInfo
->
u
.
pCRLContext
->
pbCrlEncoded
,
pExportInfo
->
u
.
pCRLContext
->
cbCrlEncoded
);
break
;
case
CRYPTUI_WIZ_EXPORT_CTL_CONTEXT
:
ret
=
save_der
(
data
->
file
,
data
->
pExportInfo
->
u
.
pCTLContext
->
pbCtlEncoded
,
data
->
pExportInfo
->
u
.
pCTLContext
->
cbCtlEncoded
);
ret
=
save_der
(
file
,
pExportInfo
->
u
.
pCTLContext
->
pbCtlEncoded
,
pExportInfo
->
u
.
pCTLContext
->
cbCtlEncoded
);
break
;
default:
switch
(
data
->
contextInfo
.
dwExportFormat
)
switch
(
pContextInfo
->
dwExportFormat
)
{
case
CRYPTUI_WIZ_EXPORT_FORMAT_BASE64
:
ret
=
save_base64
(
data
->
file
,
data
->
pExportInfo
->
u
.
pCertContext
->
pbCertEncoded
,
data
->
pExportInfo
->
u
.
pCertContext
->
cbCertEncoded
);
ret
=
save_base64
(
file
,
pExportInfo
->
u
.
pCertContext
->
pbCertEncoded
,
pExportInfo
->
u
.
pCertContext
->
cbCertEncoded
);
break
;
case
CRYPTUI_WIZ_EXPORT_FORMAT_PKCS7
:
ret
=
save_cms
(
data
->
file
,
data
->
pExportInfo
,
data
->
contextInfo
.
fExportChain
);
ret
=
save_cms
(
file
,
pExportInfo
,
pContextInfo
->
fExportChain
);
break
;
case
CRYPTUI_WIZ_EXPORT_FORMAT_PFX
:
FIXME
(
"unimplemented for PFX
\n
"
);
ret
=
FALSE
;
break
;
default:
ret
=
save_der
(
data
->
file
,
data
->
pExportInfo
->
u
.
pCertContext
->
pbCertEncoded
,
data
->
pExportInfo
->
u
.
pCertContext
->
cbCertEncoded
);
ret
=
save_der
(
file
,
pExportInfo
->
u
.
pCertContext
->
pbCertEncoded
,
pExportInfo
->
u
.
pCertContext
->
cbCertEncoded
);
}
}
return
ret
;
...
...
@@ -6191,7 +6190,8 @@ static LRESULT CALLBACK export_finish_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
DWORD
mbFlags
;
data
=
(
struct
ExportWizData
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
if
((
data
->
success
=
do_export
(
data
)))
if
((
data
->
success
=
do_export
(
data
->
file
,
data
->
pExportInfo
,
&
data
->
contextInfo
)))
{
messageID
=
IDS_EXPORT_SUCCEEDED
;
mbFlags
=
MB_OK
;
...
...
@@ -6344,8 +6344,17 @@ BOOL WINAPI CryptUIWizExport(DWORD dwFlags, HWND hwndParent,
pvoid
);
else
{
FIXME
(
"stub
\n
"
);
ret
=
FALSE
;
HANDLE
file
=
CreateFileW
(
pExportInfo
->
pwszExportFileName
,
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
ret
=
do_export
(
file
,
pExportInfo
,
pvoid
);
CloseHandle
(
file
);
}
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