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
f1be598e
Commit
f1be598e
authored
Jun 08, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Jun 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Support CERT_COMPARE_NAME_STR_A in CertFindCertificateInStore.
parent
224db0d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
cert.c
dlls/crypt32/cert.c
+34
-2
No files found.
dlls/crypt32/cert.c
View file @
f1be598e
...
@@ -1516,7 +1516,36 @@ static BOOL compare_cert_by_name_str(PCCERT_CONTEXT pCertContext,
...
@@ -1516,7 +1516,36 @@ static BOOL compare_cert_by_name_str(PCCERT_CONTEXT pCertContext,
return
ret
;
return
ret
;
}
}
static
PCCERT_CONTEXT
find_cert_by_name_str
(
HCERTSTORE
store
,
DWORD
dwType
,
static
PCCERT_CONTEXT
find_cert_by_name_str_a
(
HCERTSTORE
store
,
DWORD
dwType
,
DWORD
dwFlags
,
const
void
*
pvPara
,
PCCERT_CONTEXT
prev
)
{
PCCERT_CONTEXT
found
=
NULL
;
TRACE
(
"%s
\n
"
,
debugstr_a
(
pvPara
));
if
(
pvPara
)
{
int
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
NULL
,
0
);
LPWSTR
str
=
CryptMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
str
)
{
LPWSTR
ptr
;
MultiByteToWideChar
(
CP_ACP
,
0
,
pvPara
,
-
1
,
str
,
len
);
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
*
ptr
=
tolowerW
(
*
ptr
);
found
=
cert_compare_certs_in_store
(
store
,
prev
,
compare_cert_by_name_str
,
dwType
,
dwFlags
,
str
);
CryptMemFree
(
str
);
}
}
else
found
=
find_cert_any
(
store
,
dwType
,
dwFlags
,
NULL
,
prev
);
return
found
;
}
static
PCCERT_CONTEXT
find_cert_by_name_str_w
(
HCERTSTORE
store
,
DWORD
dwType
,
DWORD
dwFlags
,
const
void
*
pvPara
,
PCCERT_CONTEXT
prev
)
DWORD
dwFlags
,
const
void
*
pvPara
,
PCCERT_CONTEXT
prev
)
{
{
PCCERT_CONTEXT
found
=
NULL
;
PCCERT_CONTEXT
found
=
NULL
;
...
@@ -1574,8 +1603,11 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore,
...
@@ -1574,8 +1603,11 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore,
case
CERT_COMPARE_PUBLIC_KEY
:
case
CERT_COMPARE_PUBLIC_KEY
:
compare
=
compare_cert_by_public_key
;
compare
=
compare_cert_by_public_key
;
break
;
break
;
case
CERT_COMPARE_NAME_STR_A
:
find
=
find_cert_by_name_str_a
;
break
;
case
CERT_COMPARE_NAME_STR_W
:
case
CERT_COMPARE_NAME_STR_W
:
find
=
find_cert_by_name_str
;
find
=
find_cert_by_name_str
_w
;
break
;
break
;
case
CERT_COMPARE_SUBJECT_CERT
:
case
CERT_COMPARE_SUBJECT_CERT
:
compare
=
compare_cert_by_subject_cert
;
compare
=
compare_cert_by_subject_cert
;
...
...
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