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
31a78a76
Commit
31a78a76
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: Implement importing CRLs with CryptUIWizImport.
parent
23f789fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
main.c
dlls/cryptui/main.c
+34
-0
No files found.
dlls/cryptui/main.c
View file @
31a78a76
...
...
@@ -3468,6 +3468,34 @@ static BOOL import_cert(PCCERT_CONTEXT cert, HCERTSTORE hDestCertStore)
return
ret
;
}
static
BOOL
import_crl
(
PCCRL_CONTEXT
crl
,
HCERTSTORE
hDestCertStore
)
{
HCERTSTORE
store
;
BOOL
ret
;
if
(
!
crl
)
{
SetLastError
(
E_INVALIDARG
);
return
FALSE
;
}
if
(
hDestCertStore
)
store
=
hDestCertStore
;
else
{
static
const
WCHAR
ca
[]
=
{
'C'
,
'A'
,
0
};
if
(
!
(
store
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_W
,
0
,
0
,
CERT_SYSTEM_STORE_CURRENT_USER
,
ca
)))
{
WARN
(
"unable to open certificate store
\n
"
);
return
FALSE
;
}
}
ret
=
CertAddCRLContextToStore
(
store
,
crl
,
CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES
,
NULL
);
if
(
!
hDestCertStore
)
CertCloseStore
(
store
,
0
);
return
ret
;
}
/* Checks type, a type such as CERT_QUERY_CONTENT_CERT returned by
* CryptQueryObject, against the allowed types. Returns TRUE if the
* type is allowed, FALSE otherwise.
...
...
@@ -3571,6 +3599,12 @@ BOOL WINAPI CryptUIWizImport(DWORD dwFlags, HWND hwndParent, LPCWSTR pwszWizardT
else
import_warn_type_mismatch
(
dwFlags
,
hwndParent
,
pwszWizardTitle
);
break
;
case
CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT
:
if
((
ret
=
check_context_type
(
dwFlags
,
CERT_QUERY_CONTENT_CRL
)))
ret
=
import_crl
(
pImportSrc
->
u
.
pCRLContext
,
hDestCertStore
);
else
import_warn_type_mismatch
(
dwFlags
,
hwndParent
,
pwszWizardTitle
);
break
;
default:
FIXME
(
"source type not implemented: %u
\n
"
,
pImportSrc
->
dwSubjectChoice
);
SetLastError
(
E_INVALIDARG
);
...
...
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