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
d728169d
Commit
d728169d
authored
May 14, 2010
by
Juan Lang
Committed by
Alexandre Julliard
May 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement CertAddCertificateLinkToStore on top of CertAddCertificateContextToStore.
parent
99b9e1ae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
cert.c
dlls/crypt32/cert.c
+6
-3
store.c
dlls/crypt32/tests/store.c
+1
-9
No files found.
dlls/crypt32/cert.c
View file @
d728169d
...
...
@@ -113,10 +113,12 @@ BOOL WINAPI CertAddCertificateLinkToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT
pCertContext
,
DWORD
dwAddDisposition
,
PCCERT_CONTEXT
*
ppCertContext
)
{
static
int
calls
;
PWINECRYPT_CERTSTORE
store
=
(
PWINECRYPT_CERTSTORE
)
hCertStore
;
FIXME
(
"(%p, %p, %08x, %p)
\n
"
,
hCertStore
,
pCertContext
,
dwAddDisposition
,
ppCertContext
);
if
(
!
(
calls
++
))
FIXME
(
"(%p, %p, %08x, %p): semi-stub
\n
"
,
hCertStore
,
pCertContext
,
dwAddDisposition
,
ppCertContext
);
if
(
store
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
return
FALSE
;
if
(
store
->
type
==
StoreTypeCollection
)
...
...
@@ -124,7 +126,8 @@ BOOL WINAPI CertAddCertificateLinkToStore(HCERTSTORE hCertStore,
SetLastError
(
E_INVALIDARG
);
return
FALSE
;
}
return
FALSE
;
return
CertAddCertificateContextToStore
(
hCertStore
,
pCertContext
,
dwAddDisposition
,
ppCertContext
);
}
PCCERT_CONTEXT
WINAPI
CertCreateCertificateContext
(
DWORD
dwCertEncodingType
,
...
...
dlls/crypt32/tests/store.c
View file @
d728169d
...
...
@@ -2078,7 +2078,6 @@ static void compareStore(HCERTSTORE store, LPCSTR name, const BYTE *pb,
{
ret
=
CertSaveStore
(
store
,
X509_ASN_ENCODING
,
CERT_STORE_SAVE_AS_STORE
,
CERT_STORE_SAVE_TO_MEMORY
,
&
blob
,
0
);
ok
(
ret
,
"CertSaveStore failed: %08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
pb
,
blob
.
pbData
,
cb
),
"%s: unexpected value
\n
"
,
name
);
HeapFree
(
GetProcessHeap
(),
0
,
blob
.
pbData
);
}
...
...
@@ -2151,19 +2150,16 @@ static void testAddCertificateLink(void)
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
SetLastError
(
0xdeadbeef
);
ret
=
CertAddCertificateLinkToStore
(
store1
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
source
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
));
SetLastError
(
0xdeadbeef
);
ret
=
CertAddCertificateLinkToStore
(
store1
,
source
,
0
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
ret
=
CertAddCertificateLinkToStore
(
store1
,
source
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
todo_wine
ok
(
ret
,
"CertAddCertificateLinkToStore failed: %08x
\n
"
,
GetLastError
());
if
(
0
)
{
...
...
@@ -2179,7 +2175,6 @@ static void testAddCertificateLink(void)
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
ret
=
CertAddCertificateLinkToStore
(
store1
,
source
,
CERT_STORE_ADD_ALWAYS
,
&
linked
);
todo_wine
ok
(
ret
,
"CertAddCertificateLinkToStore failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -2252,7 +2247,6 @@ static void testAddCertificateLink(void)
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
ret
=
CertAddCertificateLinkToStore
(
store2
,
source
,
CERT_STORE_ADD_ALWAYS
,
&
linked
);
todo_wine
ok
(
ret
,
"CertAddCertificateLinkToStore failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -2313,7 +2307,6 @@ static void testAddCertificateLink(void)
/* Test adding a link to a file store. */
ret
=
CertAddCertificateLinkToStore
(
store2
,
source
,
CERT_STORE_ADD_ALWAYS
,
&
linked
);
todo_wine
ok
(
ret
,
"CertAddCertificateLinkToStore failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -2381,13 +2374,13 @@ static void testAddCertificateLink(void)
ret
=
CertAddCertificateLinkToStore
(
store2
,
source
,
CERT_STORE_ADD_ALWAYS
,
&
linked
);
todo_wine
ok
(
ret
,
"CertAddCertificateLinkToStore failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
ok
(
linked
->
hCertStore
==
store2
,
"unexpected store"
);
ret
=
pCertControlStore
(
store2
,
0
,
CERT_STORE_CTRL_COMMIT
,
NULL
);
ok
(
ret
,
"CertControlStore failed: %d
\n
"
,
ret
);
todo_wine
compareStore
(
store2
,
"file store -> system store"
,
serializedStoreWithCertAndHash
,
sizeof
(
serializedStoreWithCertAndHash
));
...
...
@@ -2405,7 +2398,6 @@ static void testAddCertificateLink(void)
ok
(
store2
!=
NULL
,
"CertOpenStore failed: %08x
\n
"
,
GetLastError
());
ret
=
CertAddCertificateLinkToStore
(
store2
,
source
,
CERT_STORE_ADD_ALWAYS
,
&
linked
);
todo_wine
ok
(
ret
,
"CertAddCertificateLinkToStore failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
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