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
0ff7bf13
Commit
0ff7bf13
authored
Sep 22, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Sep 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptdlg: Implement CertViewPropertiesW on top of CryptUIDlgViewCertificateW.
parent
f422fa83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
3 deletions
+57
-3
Makefile.in
dlls/cryptdlg/Makefile.in
+1
-1
main.c
dlls/cryptdlg/main.c
+56
-2
No files found.
dlls/cryptdlg/Makefile.in
View file @
0ff7bf13
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
cryptdlg.dll
IMPORTS
=
crypt32 wintrust kernel32
IMPORTS
=
crypt
ui crypt
32 wintrust kernel32
C_SRCS
=
\
main.c
...
...
dlls/cryptdlg/main.c
View file @
0ff7bf13
...
...
@@ -27,6 +27,7 @@
#include "wintrust.h"
#include "winuser.h"
#include "cryptdlg.h"
#include "cryptuiapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
cryptdlg
);
...
...
@@ -145,8 +146,61 @@ error:
*/
BOOL
WINAPI
CertViewPropertiesW
(
CERT_VIEWPROPERTIES_STRUCT_W
*
info
)
{
FIXME
(
"(%p): stub
\n
"
,
info
);
return
FALSE
;
static
GUID
cert_action_verify
=
CERT_CERTIFICATE_ACTION_VERIFY
;
CERT_VERIFY_CERTIFICATE_TRUST
trust
;
WINTRUST_BLOB_INFO
blob
;
WINTRUST_DATA
wtd
;
LONG
err
;
BOOL
ret
;
TRACE
(
"(%p)
\n
"
,
info
);
memset
(
&
trust
,
0
,
sizeof
(
trust
));
trust
.
cbSize
=
sizeof
(
trust
);
trust
.
pccert
=
info
->
pCertContext
;
trust
.
cRootStores
=
info
->
cRootStores
;
trust
.
rghstoreRoots
=
info
->
rghstoreRoots
;
trust
.
cStores
=
info
->
cStores
;
trust
.
rghstoreCAs
=
info
->
rghstoreCAs
;
trust
.
cTrustStores
=
info
->
cTrustStores
;
trust
.
rghstoreTrust
=
info
->
rghstoreTrust
;
memset
(
&
blob
,
0
,
sizeof
(
blob
));
blob
.
cbStruct
=
sizeof
(
blob
);
blob
.
cbMemObject
=
sizeof
(
trust
);
blob
.
pbMemObject
=
(
BYTE
*
)
&
trust
;
memset
(
&
wtd
,
0
,
sizeof
(
wtd
));
wtd
.
cbStruct
=
sizeof
(
wtd
);
wtd
.
dwUIChoice
=
WTD_UI_NONE
;
wtd
.
dwUnionChoice
=
WTD_CHOICE_BLOB
;
wtd
.
pBlob
=
&
blob
;
wtd
.
dwStateAction
=
WTD_STATEACTION_VERIFY
;
err
=
WinVerifyTrust
(
NULL
,
&
cert_action_verify
,
&
wtd
);
if
(
err
==
ERROR_SUCCESS
)
{
CRYPTUI_VIEWCERTIFICATE_STRUCTW
uiInfo
;
BOOL
propsChanged
=
FALSE
;
memset
(
&
uiInfo
,
0
,
sizeof
(
uiInfo
));
uiInfo
.
dwSize
=
sizeof
(
uiInfo
);
uiInfo
.
hwndParent
=
info
->
hwndParent
;
uiInfo
.
dwFlags
=
CRYPTUI_DISABLE_ADDTOSTORE
|
CRYPTUI_ENABLE_EDITPROPERTIES
;
uiInfo
.
szTitle
=
info
->
szTitle
;
uiInfo
.
pCertContext
=
info
->
pCertContext
;
uiInfo
.
cPurposes
=
info
->
cArrayPurposes
;
uiInfo
.
rgszPurposes
=
(
LPCSTR
*
)
info
->
arrayPurposes
;
uiInfo
.
hWVTStateData
=
wtd
.
hWVTStateData
;
uiInfo
.
fpCryptProviderDataTrustedUsage
=
TRUE
;
uiInfo
.
cPropSheetPages
=
info
->
cArrayPropSheetPages
;
uiInfo
.
rgPropSheetPages
=
info
->
arrayPropSheetPages
;
uiInfo
.
nStartPage
=
info
->
nStartPage
;
ret
=
CryptUIDlgViewCertificateW
(
&
uiInfo
,
&
propsChanged
);
wtd
.
dwStateAction
=
WTD_STATEACTION_CLOSE
;
WinVerifyTrust
(
NULL
,
&
cert_action_verify
,
&
wtd
);
}
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