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
60fcce55
Commit
60fcce55
authored
Sep 28, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Create file store directly in CRYPT_FileNameOpenStoreW.
parent
2373b8bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
filestore.c
dlls/crypt32/filestore.c
+27
-6
No files found.
dlls/crypt32/filestore.c
View file @
60fcce55
...
...
@@ -227,6 +227,12 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
SetLastError
(
ERROR_PATH_NOT_FOUND
);
return
NULL
;
}
if
((
dwFlags
&
CERT_STORE_READONLY_FLAG
)
&&
(
dwFlags
&
CERT_FILE_STORE_COMMIT_ENABLE_FLAG
))
{
SetLastError
(
E_INVALIDARG
);
return
NULL
;
}
access
=
GENERIC_READ
;
if
(
dwFlags
&
CERT_FILE_STORE_COMMIT_ENABLE_FLAG
)
...
...
@@ -241,12 +247,27 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
/* FIXME: need to check whether it's a serialized store; if not, fall
* back to a PKCS#7 signed message, then to a single serialized cert.
*/
store
=
CertOpenStore
(
CERT_STORE_PROV_FILE
,
0
,
hCryptProv
,
dwFlags
,
file
);
CloseHandle
(
file
);
HCERTSTORE
memStore
;
memStore
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
if
(
memStore
)
{
if
(
CRYPT_ReadSerializedStoreFromFile
(
file
,
memStore
))
{
store
=
CRYPT_CreateFileStore
(
dwFlags
,
memStore
,
file
);
/* File store doesn't need crypto provider, so close it */
if
(
hCryptProv
&&
!
(
dwFlags
&
CERT_STORE_NO_CRYPT_RELEASE_FLAG
))
CryptReleaseContext
(
hCryptProv
,
0
);
}
else
{
/* FIXME: fall back to a PKCS#7 signed message, then to a
* single serialized cert.
*/
}
}
}
return
(
PWINECRYPT_CERTSTORE
)
store
;
}
...
...
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