Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e857f383
Commit
e857f383
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: Implement I_CertUpdateStore.
parent
542af8ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
21 deletions
+32
-21
main.c
dlls/crypt32/main.c
+0
-10
store.c
dlls/crypt32/store.c
+32
-0
store.c
dlls/crypt32/tests/store.c
+0
-11
No files found.
dlls/crypt32/main.c
View file @
e857f383
...
...
@@ -60,16 +60,6 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void)
return
hDefProv
;
}
/* Appears to be called to update the contents of store1 with those in store2.
* The second two parameters are unknown.
*/
BOOL
WINAPI
I_CertUpdateStore
(
HCERTSTORE
store1
,
HCERTSTORE
store2
,
DWORD
unk0
,
DWORD
unk1
)
{
FIXME
(
"(%p, %p, %08x, %08x)
\n
"
,
store1
,
store2
,
unk0
,
unk1
);
return
FALSE
;
}
typedef
void
*
HLRUCACHE
;
/* this function is called by Internet Explorer when it is about to verify a
...
...
dlls/crypt32/store.c
View file @
e857f383
...
...
@@ -216,6 +216,38 @@ void CRYPT_EmptyStore(HCERTSTORE store)
}
while
(
crl
);
}
BOOL
WINAPI
I_CertUpdateStore
(
HCERTSTORE
store1
,
HCERTSTORE
store2
,
DWORD
unk0
,
DWORD
unk1
)
{
static
BOOL
warned
=
FALSE
;
PCCERT_CONTEXT
cert
=
NULL
;
PCCRL_CONTEXT
crl
=
NULL
;
TRACE
(
"(%p, %p, %08x, %08x)
\n
"
,
store1
,
store2
,
unk0
,
unk1
);
if
(
!
warned
)
{
FIXME
(
"semi-stub
\n
"
);
warned
=
TRUE
;
}
/* Poor-man's resync: empty first store, then add everything from second
* store to it.
*/
CRYPT_EmptyStore
(
store1
);
do
{
cert
=
CertEnumCertificatesInStore
(
store2
,
cert
);
if
(
cert
)
CertAddCertificateContextToStore
(
store1
,
cert
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
}
while
(
cert
);
do
{
crl
=
CertEnumCRLsInStore
(
store2
,
crl
);
if
(
crl
)
CertAddCRLContextToStore
(
store1
,
crl
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
}
while
(
crl
);
return
TRUE
;
}
static
void
WINAPI
CRYPT_MemCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
WINE_MEMSTORE
*
store
=
(
WINE_MEMSTORE
*
)
hCertStore
;
...
...
dlls/crypt32/tests/store.c
View file @
e857f383
...
...
@@ -1840,32 +1840,25 @@ static void test_I_UpdateStore(void)
ret = pI_CertUpdatestore(NULL, store2, 0, 0);
*/
ret
=
pI_CertUpdatestore
(
store1
,
store2
,
0
,
0
);
todo_wine
ok
(
ret
,
"I_CertUpdateStore failed: %08x
\n
"
,
GetLastError
());
CertAddEncodedCertificateToStore
(
store2
,
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
),
CERT_STORE_ADD_ALWAYS
,
&
cert
);
/* I_CertUpdateStore adds the contexts from store2 to store1 */
ret
=
pI_CertUpdatestore
(
store1
,
store2
,
0
,
0
);
todo_wine
ok
(
ret
,
"I_CertUpdateStore failed: %08x
\n
"
,
GetLastError
());
certs
=
countCertsInStore
(
store1
);
todo_wine
ok
(
certs
==
1
,
"Expected 1 cert, got %d
\n
"
,
certs
);
/* Calling it a second time has no effect */
ret
=
pI_CertUpdatestore
(
store1
,
store2
,
0
,
0
);
todo_wine
ok
(
ret
,
"I_CertUpdateStore failed: %08x
\n
"
,
GetLastError
());
certs
=
countCertsInStore
(
store1
);
todo_wine
ok
(
certs
==
1
,
"Expected 1 cert, got %d
\n
"
,
certs
);
/* The last parameters to I_CertUpdateStore appear to be ignored */
ret
=
pI_CertUpdatestore
(
store1
,
store2
,
1
,
0
);
todo_wine
ok
(
ret
,
"I_CertUpdateStore failed: %08x
\n
"
,
GetLastError
());
ret
=
pI_CertUpdatestore
(
store1
,
store2
,
0
,
1
);
todo_wine
ok
(
ret
,
"I_CertUpdateStore failed: %08x
\n
"
,
GetLastError
());
CertAddEncodedCRLToStore
(
store2
,
X509_ASN_ENCODING
,
signedCRL
,
...
...
@@ -1873,13 +1866,10 @@ static void test_I_UpdateStore(void)
/* I_CertUpdateStore also adds the CRLs from store2 to store1 */
ret
=
pI_CertUpdatestore
(
store1
,
store2
,
0
,
0
);
todo_wine
ok
(
ret
,
"I_CertUpdateStore failed: %08x
\n
"
,
GetLastError
());
certs
=
countCertsInStore
(
store1
);
todo_wine
ok
(
certs
==
1
,
"Expected 1 cert, got %d
\n
"
,
certs
);
certs
=
countCRLsInStore
(
store1
);
todo_wine
ok
(
certs
==
1
,
"Expected 1 CRL, got %d
\n
"
,
certs
);
CertDeleteCertificateFromStore
(
cert
);
...
...
@@ -1887,7 +1877,6 @@ static void test_I_UpdateStore(void)
* from store1
*/
ret
=
pI_CertUpdatestore
(
store1
,
store2
,
0
,
0
);
todo_wine
ok
(
ret
,
"I_CertUpdateStore failed: %08x
\n
"
,
GetLastError
());
certs
=
countCertsInStore
(
store1
);
ok
(
certs
==
0
,
"Expected 0 certs, got %d
\n
"
,
certs
);
...
...
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