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
88944963
Commit
88944963
authored
Oct 18, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Use I_CertUpdateStore in file stores.
parent
e857f383
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
21 deletions
+16
-21
crypt32_private.h
dlls/crypt32/crypt32_private.h
+2
-0
filestore.c
dlls/crypt32/filestore.c
+14
-21
No files found.
dlls/crypt32/crypt32_private.h
View file @
88944963
...
@@ -234,6 +234,8 @@ void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags,
...
@@ -234,6 +234,8 @@ void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags,
CertStoreType
type
);
CertStoreType
type
);
void
CRYPT_FreeStore
(
PWINECRYPT_CERTSTORE
store
);
void
CRYPT_FreeStore
(
PWINECRYPT_CERTSTORE
store
);
void
CRYPT_EmptyStore
(
HCERTSTORE
store
);
void
CRYPT_EmptyStore
(
HCERTSTORE
store
);
BOOL
WINAPI
I_CertUpdateStore
(
HCERTSTORE
store1
,
HCERTSTORE
store2
,
DWORD
unk0
,
DWORD
unk1
);
PWINECRYPT_CERTSTORE
CRYPT_CollectionOpenStore
(
HCRYPTPROV
hCryptProv
,
PWINECRYPT_CERTSTORE
CRYPT_CollectionOpenStore
(
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
);
DWORD
dwFlags
,
const
void
*
pvPara
);
...
...
dlls/crypt32/filestore.c
View file @
88944963
...
@@ -118,11 +118,20 @@ static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags,
...
@@ -118,11 +118,20 @@ static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags,
switch
(
dwCtrlType
)
switch
(
dwCtrlType
)
{
{
case
CERT_STORE_CTRL_RESYNC
:
case
CERT_STORE_CTRL_RESYNC
:
CRYPT_EmptyStore
(
store
->
memStore
);
store
->
dirty
=
FALSE
;
store
->
dirty
=
FALSE
;
if
(
store
->
type
==
CERT_STORE_SAVE_AS_STORE
)
if
(
store
->
type
==
CERT_STORE_SAVE_AS_STORE
)
ret
=
CRYPT_ReadSerializedStoreFromFile
(
store
->
file
,
{
store
->
memStore
);
HCERTSTORE
memStore
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
/* FIXME: if I could translate a handle to a path, I could use
* CryptQueryObject instead, but there's no API to do so yet.
*/
ret
=
CRYPT_ReadSerializedStoreFromFile
(
store
->
file
,
memStore
);
if
(
ret
)
I_CertUpdateStore
(
store
->
memStore
,
memStore
,
0
,
0
);
CertCloseStore
(
memStore
,
0
);
}
else
if
(
store
->
type
==
CERT_STORE_SAVE_AS_PKCS7
)
else
if
(
store
->
type
==
CERT_STORE_SAVE_AS_PKCS7
)
{
{
CERT_BLOB
blob
=
{
0
,
NULL
};
CERT_BLOB
blob
=
{
0
,
NULL
};
...
@@ -136,24 +145,8 @@ static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags,
...
@@ -136,24 +145,8 @@ static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags,
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
,
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
,
CERT_QUERY_FORMAT_FLAG_BINARY
,
0
,
NULL
,
NULL
,
NULL
,
CERT_QUERY_FORMAT_FLAG_BINARY
,
0
,
NULL
,
NULL
,
NULL
,
&
messageStore
,
NULL
,
NULL
);
&
messageStore
,
NULL
,
NULL
);
if
(
ret
)
I_CertUpdateStore
(
store
->
memStore
,
messageStore
,
0
,
0
);
{
CertCloseStore
(
messageStore
,
0
);
PCCERT_CONTEXT
cert
=
NULL
;
PCCRL_CONTEXT
crl
=
NULL
;
do
{
cert
=
CertEnumCertificatesInStore
(
messageStore
,
cert
);
if
(
cert
)
CertAddCertificateContextToStore
(
store
->
memStore
,
cert
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
}
while
(
cert
);
do
{
crl
=
CertEnumCRLsInStore
(
messageStore
,
crl
);
if
(
crl
)
CertAddCRLContextToStore
(
store
->
memStore
,
crl
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
}
while
(
crl
);
}
CryptMemFree
(
blob
.
pbData
);
CryptMemFree
(
blob
.
pbData
);
}
}
}
}
...
...
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