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
b81c0c3e
Commit
b81c0c3e
authored
Oct 25, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Simplify the CertComparePublicKeyInfo implementation.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98fad7df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
+5
-16
cert.c
dlls/crypt32/cert.c
+5
-16
No files found.
dlls/crypt32/cert.c
View file @
b81c0c3e
...
@@ -1267,32 +1267,21 @@ BOOL WINAPI CertComparePublicKeyInfo(DWORD dwCertEncodingType,
...
@@ -1267,32 +1267,21 @@ BOOL WINAPI CertComparePublicKeyInfo(DWORD dwCertEncodingType,
ret
=
FALSE
;
ret
=
FALSE
;
if
(
CryptDecodeObject
(
dwCertEncodingType
,
RSA_CSP_PUBLICKEYBLOB
,
if
(
CryptDecodeObject
(
dwCertEncodingType
,
RSA_CSP_PUBLICKEYBLOB
,
pPublicKey1
->
PublicKey
.
pbData
,
pPublicKey1
->
PublicKey
.
cbData
,
pPublicKey1
->
PublicKey
.
pbData
,
pPublicKey1
->
PublicKey
.
cbData
,
0
,
NULL
,
&
length
))
CRYPT_DECODE_ALLOC_FLAG
,
&
pblob1
,
&
length
))
{
pblob1
=
CryptMemAlloc
(
length
);
if
(
CryptDecodeObject
(
dwCertEncodingType
,
RSA_CSP_PUBLICKEYBLOB
,
pPublicKey1
->
PublicKey
.
pbData
,
pPublicKey1
->
PublicKey
.
cbData
,
0
,
pblob1
,
&
length
))
{
{
if
(
CryptDecodeObject
(
dwCertEncodingType
,
RSA_CSP_PUBLICKEYBLOB
,
if
(
CryptDecodeObject
(
dwCertEncodingType
,
RSA_CSP_PUBLICKEYBLOB
,
pPublicKey2
->
PublicKey
.
pbData
,
pPublicKey2
->
PublicKey
.
cbData
,
pPublicKey2
->
PublicKey
.
pbData
,
pPublicKey2
->
PublicKey
.
cbData
,
0
,
NULL
,
&
length
))
CRYPT_DECODE_ALLOC_FLAG
,
&
pblob2
,
&
length
))
{
pblob2
=
CryptMemAlloc
(
length
);
if
(
CryptDecodeObject
(
dwCertEncodingType
,
RSA_CSP_PUBLICKEYBLOB
,
pPublicKey2
->
PublicKey
.
pbData
,
pPublicKey2
->
PublicKey
.
cbData
,
0
,
pblob2
,
&
length
))
{
{
/* The RSAPUBKEY structure directly follows the BLOBHEADER */
/* The RSAPUBKEY structure directly follows the BLOBHEADER */
RSAPUBKEY
*
pk1
=
(
LPVOID
)(
pblob1
+
1
),
RSAPUBKEY
*
pk1
=
(
LPVOID
)(
pblob1
+
1
),
*
pk2
=
(
LPVOID
)(
pblob2
+
1
);
*
pk2
=
(
LPVOID
)(
pblob2
+
1
);
ret
=
(
pk1
->
bitlen
==
pk2
->
bitlen
)
&&
(
pk1
->
pubexp
==
pk2
->
pubexp
)
ret
=
(
pk1
->
bitlen
==
pk2
->
bitlen
)
&&
(
pk1
->
pubexp
==
pk2
->
pubexp
)
&&
!
memcmp
(
pk1
+
1
,
pk2
+
1
,
pk1
->
bitlen
/
8
);
&&
!
memcmp
(
pk1
+
1
,
pk2
+
1
,
pk1
->
bitlen
/
8
);
LocalFree
(
pblob2
);
}
}
CryptMemFree
(
pblob2
);
LocalFree
(
pblob1
);
}
}
CryptMemFree
(
pblob1
);
}
}
break
;
break
;
...
...
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