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
a1e14fee
Commit
a1e14fee
authored
Aug 08, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement CertFindCertificateInStore for CERT_FIND_SIGNATURE_HASH.
parent
e763923b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
cert.c
dlls/crypt32/cert.c
+29
-0
No files found.
dlls/crypt32/cert.c
View file @
a1e14fee
...
...
@@ -1143,6 +1143,32 @@ static BOOL compare_existing_cert(PCCERT_CONTEXT pCertContext, DWORD dwType,
pCertContext
->
pCertInfo
,
toCompare
->
pCertInfo
);
}
static
BOOL
compare_cert_by_signature_hash
(
PCCERT_CONTEXT
pCertContext
,
DWORD
dwType
,
DWORD
dwFlags
,
const
void
*
pvPara
)
{
const
CRYPT_HASH_BLOB
*
hash
=
(
const
CRYPT_HASH_BLOB
*
)
pvPara
;
DWORD
size
=
0
;
BOOL
ret
;
ret
=
CertGetCertificateContextProperty
(
pCertContext
,
CERT_SIGNATURE_HASH_PROP_ID
,
NULL
,
&
size
);
if
(
ret
&&
size
==
hash
->
cbData
)
{
LPBYTE
buf
=
CryptMemAlloc
(
size
);
if
(
buf
)
{
CertGetCertificateContextProperty
(
pCertContext
,
CERT_SIGNATURE_HASH_PROP_ID
,
buf
,
&
size
);
ret
=
!
memcmp
(
buf
,
hash
->
pbData
,
size
);
CryptMemFree
(
buf
);
}
}
else
ret
=
FALSE
;
return
ret
;
}
PCCERT_CONTEXT
WINAPI
CertFindCertificateInStore
(
HCERTSTORE
hCertStore
,
DWORD
dwCertEncodingType
,
DWORD
dwFlags
,
DWORD
dwType
,
const
void
*
pvPara
,
PCCERT_CONTEXT
pPrevCertContext
)
...
...
@@ -1179,6 +1205,9 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore,
case
CERT_COMPARE_EXISTING
:
compare
=
compare_existing_cert
;
break
;
case
CERT_COMPARE_SIGNATURE_HASH
:
compare
=
compare_cert_by_signature_hash
;
break
;
default:
FIXME
(
"find type %08x unimplemented
\n
"
,
dwType
);
compare
=
NULL
;
...
...
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