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
88a01618
Commit
88a01618
authored
Jun 15, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Jun 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add support for CERT_STORE_PROV_SERIALIZED to CertOpenStore.
parent
06a3cea1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
store.c
dlls/crypt32/store.c
+33
-0
store.c
dlls/crypt32/tests/store.c
+0
-3
No files found.
dlls/crypt32/store.c
View file @
88a01618
...
@@ -724,6 +724,34 @@ static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
...
@@ -724,6 +724,34 @@ static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
return
store
;
return
store
;
}
}
static
PWINECRYPT_CERTSTORE
CRYPT_SerializedOpenStore
(
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
)
{
HCERTSTORE
store
;
const
CRYPT_DATA_BLOB
*
data
=
pvPara
;
TRACE
(
"(%ld, %08x, %p)
\n
"
,
hCryptProv
,
dwFlags
,
pvPara
);
if
(
dwFlags
&
CERT_STORE_DELETE_FLAG
)
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
NULL
;
}
store
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
if
(
store
)
{
if
(
!
CRYPT_ReadSerializedStoreFromBlob
(
data
,
store
))
{
CertCloseStore
(
store
,
0
);
store
=
NULL
;
}
}
TRACE
(
"returning %p
\n
"
,
store
);
return
(
PWINECRYPT_CERTSTORE
)
store
;
}
static
PWINECRYPT_CERTSTORE
CRYPT_PhysOpenStoreW
(
HCRYPTPROV
hCryptProv
,
static
PWINECRYPT_CERTSTORE
CRYPT_PhysOpenStoreW
(
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
)
DWORD
dwFlags
,
const
void
*
pvPara
)
{
{
...
@@ -761,6 +789,9 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
...
@@ -761,6 +789,9 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
case
LOWORD
(
CERT_STORE_PROV_PKCS7
):
case
LOWORD
(
CERT_STORE_PROV_PKCS7
):
openFunc
=
CRYPT_PKCSOpenStore
;
openFunc
=
CRYPT_PKCSOpenStore
;
break
;
break
;
case
LOWORD
(
CERT_STORE_PROV_SERIALIZED
):
openFunc
=
CRYPT_SerializedOpenStore
;
break
;
case
LOWORD
(
CERT_STORE_PROV_REG
):
case
LOWORD
(
CERT_STORE_PROV_REG
):
openFunc
=
CRYPT_RegOpenStore
;
openFunc
=
CRYPT_RegOpenStore
;
break
;
break
;
...
@@ -801,6 +832,8 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
...
@@ -801,6 +832,8 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
openFunc
=
CRYPT_SysOpenStoreW
;
openFunc
=
CRYPT_SysOpenStoreW
;
else
if
(
!
strcasecmp
(
lpszStoreProvider
,
sz_CERT_STORE_PROV_PKCS7
))
else
if
(
!
strcasecmp
(
lpszStoreProvider
,
sz_CERT_STORE_PROV_PKCS7
))
openFunc
=
CRYPT_PKCSOpenStore
;
openFunc
=
CRYPT_PKCSOpenStore
;
else
if
(
!
strcasecmp
(
lpszStoreProvider
,
sz_CERT_STORE_PROV_SERIALIZED
))
openFunc
=
CRYPT_SerializedOpenStore
;
else
if
(
!
strcasecmp
(
lpszStoreProvider
,
sz_CERT_STORE_PROV_COLLECTION
))
else
if
(
!
strcasecmp
(
lpszStoreProvider
,
sz_CERT_STORE_PROV_COLLECTION
))
openFunc
=
CRYPT_CollectionOpenStore
;
openFunc
=
CRYPT_CollectionOpenStore
;
else
if
(
!
strcasecmp
(
lpszStoreProvider
,
sz_CERT_STORE_PROV_SYSTEM_REGISTRY
))
else
if
(
!
strcasecmp
(
lpszStoreProvider
,
sz_CERT_STORE_PROV_SYSTEM_REGISTRY
))
...
...
dlls/crypt32/tests/store.c
View file @
88a01618
...
@@ -1780,11 +1780,9 @@ static void testSerializedStore(void)
...
@@ -1780,11 +1780,9 @@ static void testSerializedStore(void)
blob
.
pbData
=
(
BYTE
*
)
serializedStoreWithCert
;
blob
.
pbData
=
(
BYTE
*
)
serializedStoreWithCert
;
store
=
CertOpenStore
(
CERT_STORE_PROV_SERIALIZED
,
0
,
0
,
store
=
CertOpenStore
(
CERT_STORE_PROV_SERIALIZED
,
0
,
0
,
CERT_STORE_DELETE_FLAG
,
&
blob
);
CERT_STORE_DELETE_FLAG
,
&
blob
);
todo_wine
ok
(
!
store
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
,
ok
(
!
store
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
,
"Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x
\n
"
,
GetLastError
());
"Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x
\n
"
,
GetLastError
());
store
=
CertOpenStore
(
CERT_STORE_PROV_SERIALIZED
,
0
,
0
,
0
,
&
blob
);
store
=
CertOpenStore
(
CERT_STORE_PROV_SERIALIZED
,
0
,
0
,
0
,
&
blob
);
todo_wine
ok
(
store
!=
NULL
,
"CertOpenStore failed: %08x
\n
"
,
GetLastError
());
ok
(
store
!=
NULL
,
"CertOpenStore failed: %08x
\n
"
,
GetLastError
());
if
(
store
)
if
(
store
)
{
{
...
@@ -1806,7 +1804,6 @@ static void testSerializedStore(void)
...
@@ -1806,7 +1804,6 @@ static void testSerializedStore(void)
blob
.
cbData
=
sizeof
(
serializedStoreWithCertAndCRL
);
blob
.
cbData
=
sizeof
(
serializedStoreWithCertAndCRL
);
blob
.
pbData
=
(
BYTE
*
)
serializedStoreWithCertAndCRL
;
blob
.
pbData
=
(
BYTE
*
)
serializedStoreWithCertAndCRL
;
store
=
CertOpenStore
(
CERT_STORE_PROV_SERIALIZED
,
0
,
0
,
0
,
&
blob
);
store
=
CertOpenStore
(
CERT_STORE_PROV_SERIALIZED
,
0
,
0
,
0
,
&
blob
);
todo_wine
ok
(
store
!=
NULL
,
"CertOpenStore failed: %08x
\n
"
,
GetLastError
());
ok
(
store
!=
NULL
,
"CertOpenStore failed: %08x
\n
"
,
GetLastError
());
if
(
store
)
if
(
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