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
60bb8bd8
Commit
60bb8bd8
authored
Jun 28, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Jun 30, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptdlg: Implement DllRegisterServer/DllUnregisterServer.
parent
35ce6318
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
3 deletions
+59
-3
Makefile.in
dlls/cryptdlg/Makefile.in
+1
-1
cryptdlg.spec
dlls/cryptdlg/cryptdlg.spec
+2
-2
main.c
dlls/cryptdlg/main.c
+56
-0
No files found.
dlls/cryptdlg/Makefile.in
View file @
60bb8bd8
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
cryptdlg.dll
IMPORTS
=
crypt32 kernel32
IMPORTS
=
crypt32
wintrust
kernel32
C_SRCS
=
\
main.c
...
...
dlls/cryptdlg/cryptdlg.spec
View file @
60bb8bd8
...
...
@@ -15,7 +15,7 @@
15 stub CertSelectCertificateW
16 stub CertViewPropertiesA
17 stub CertViewPropertiesW
18 st
ub DllRegisterServer
19 st
ub DllUnregisterServer
18 st
dcall -private DllRegisterServer()
19 st
dcall -private DllUnregisterServer()
20 stdcall GetFriendlyNameOfCertA(ptr ptr long)
21 stdcall GetFriendlyNameOfCertW(ptr ptr long)
dlls/cryptdlg/main.c
View file @
60bb8bd8
...
...
@@ -104,3 +104,59 @@ HRESULT WINAPI CertTrustFinalPolicy(CRYPT_PROVIDER_DATA *pProvData)
FIXME
(
"(%p)
\n
"
,
pProvData
);
return
E_NOTIMPL
;
}
/***********************************************************************
* DllRegisterServer (CRYPTDLG.@)
*/
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
static
WCHAR
cryptdlg
[]
=
{
'c'
,
'r'
,
'y'
,
'p'
,
't'
,
'd'
,
'l'
,
'g'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
WCHAR
wintrust
[]
=
{
'w'
,
'i'
,
'n'
,
't'
,
'r'
,
'u'
,
's'
,
't'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
WCHAR
certTrustInit
[]
=
{
'C'
,
'e'
,
'r'
,
't'
,
'T'
,
'r'
,
'u'
,
's'
,
't'
,
'I'
,
'n'
,
'i'
,
't'
,
0
};
static
WCHAR
wintrustCertificateTrust
[]
=
{
'W'
,
'i'
,
'n'
,
't'
,
'r'
,
'u'
,
's'
,
't'
,
'C'
,
'e'
,
'r'
,
't'
,
'i'
,
'f'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
'T'
,
'r'
,
'u'
,
's'
,
't'
,
0
};
static
WCHAR
certTrustCertPolicy
[]
=
{
'C'
,
'e'
,
'r'
,
't'
,
'T'
,
'r'
,
'u'
,
's'
,
't'
,
'C'
,
'e'
,
'r'
,
't'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'y'
,
0
};
static
WCHAR
certTrustFinalPolicy
[]
=
{
'C'
,
'e'
,
'r'
,
't'
,
'T'
,
'r'
,
'u'
,
's'
,
't'
,
'F'
,
'i'
,
'n'
,
'a'
,
'l'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'y'
,
0
};
static
WCHAR
certTrustCleanup
[]
=
{
'C'
,
'e'
,
'r'
,
't'
,
'T'
,
'r'
,
'u'
,
's'
,
't'
,
'C'
,
'l'
,
'e'
,
'a'
,
'n'
,
'u'
,
'p'
,
0
};
CRYPT_REGISTER_ACTIONID
reg
;
GUID
guid
=
CERT_CERTIFICATE_ACTION_VERIFY
;
HRESULT
hr
=
S_OK
;
memset
(
&
reg
,
0
,
sizeof
(
reg
));
reg
.
cbStruct
=
sizeof
(
reg
);
reg
.
sInitProvider
.
cbStruct
=
sizeof
(
CRYPT_TRUST_REG_ENTRY
);
reg
.
sInitProvider
.
pwszDLLName
=
cryptdlg
;
reg
.
sInitProvider
.
pwszFunctionName
=
certTrustInit
;
reg
.
sCertificateProvider
.
cbStruct
=
sizeof
(
CRYPT_TRUST_REG_ENTRY
);
reg
.
sCertificateProvider
.
pwszDLLName
=
wintrust
;
reg
.
sCertificateProvider
.
pwszFunctionName
=
wintrustCertificateTrust
;
reg
.
sCertificatePolicyProvider
.
cbStruct
=
sizeof
(
CRYPT_TRUST_REG_ENTRY
);
reg
.
sCertificatePolicyProvider
.
pwszDLLName
=
cryptdlg
;
reg
.
sCertificatePolicyProvider
.
pwszFunctionName
=
certTrustCertPolicy
;
reg
.
sFinalPolicyProvider
.
cbStruct
=
sizeof
(
CRYPT_TRUST_REG_ENTRY
);
reg
.
sFinalPolicyProvider
.
pwszDLLName
=
cryptdlg
;
reg
.
sFinalPolicyProvider
.
pwszFunctionName
=
certTrustFinalPolicy
;
reg
.
sCleanupProvider
.
cbStruct
=
sizeof
(
CRYPT_TRUST_REG_ENTRY
);
reg
.
sCleanupProvider
.
pwszDLLName
=
cryptdlg
;
reg
.
sCleanupProvider
.
pwszFunctionName
=
certTrustCleanup
;
if
(
!
WintrustAddActionID
(
&
guid
,
WT_ADD_ACTION_ID_RET_RESULT_FLAG
,
&
reg
))
hr
=
GetLastError
();
return
hr
;
}
/***********************************************************************
* DllUnregisterServer (CRYPTDLG.@)
*/
HRESULT
WINAPI
DllUnregisterServer
(
void
)
{
GUID
guid
=
CERT_CERTIFICATE_ACTION_VERIFY
;
WintrustRemoveActionID
(
&
guid
);
return
S_OK
;
}
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