Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
37754e49
Commit
37754e49
authored
Oct 09, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Oct 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Pass pointer to structure rather than assuming a particular alignment.
parent
1c27f252
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
encode.c
dlls/crypt32/encode.c
+10
-12
No files found.
dlls/crypt32/encode.c
View file @
37754e49
...
...
@@ -2800,13 +2800,10 @@ static BOOL WINAPI CRYPT_AsnEncodeCertPolicyQualifiers(DWORD dwCertEncodingType,
LPCSTR
lpszStructType
,
const
void
*
pvStructInfo
,
DWORD
dwFlags
,
PCRYPT_ENCODE_PARA
pEncodePara
,
BYTE
*
pbEncoded
,
DWORD
*
pcbEncoded
)
{
DWORD
cPolicyQualifier
=
*
(
DWORD
*
)
pvStructInfo
;
const
CERT_POLICY_QUALIFIER_INFO
*
rgPolicyQualifier
=
*
(
const
CERT_POLICY_QUALIFIER_INFO
**
)
((
LPBYTE
)
pvStructInfo
+
sizeof
(
DWORD
));
const
CERT_POLICY_INFO
*
info
=
pvStructInfo
;
BOOL
ret
;
if
(
!
cPolicyQualifier
)
if
(
!
info
->
cPolicyQualifier
)
{
*
pcbEncoded
=
0
;
ret
=
TRUE
;
...
...
@@ -2820,10 +2817,11 @@ static BOOL WINAPI CRYPT_AsnEncodeCertPolicyQualifiers(DWORD dwCertEncodingType,
DWORD
bytesNeeded
=
0
,
lenBytes
,
size
,
i
;
ret
=
TRUE
;
for
(
i
=
0
;
ret
&&
i
<
cPolicyQualifier
;
i
++
)
for
(
i
=
0
;
ret
&&
i
<
info
->
cPolicyQualifier
;
i
++
)
{
items
[
0
].
pvStructInfo
=
rgPolicyQualifier
[
i
].
pszPolicyQualifierId
;
items
[
1
].
pvStructInfo
=
&
rgPolicyQualifier
[
i
].
Qualifier
;
items
[
0
].
pvStructInfo
=
info
->
rgPolicyQualifier
[
i
].
pszPolicyQualifierId
;
items
[
1
].
pvStructInfo
=
&
info
->
rgPolicyQualifier
[
i
].
Qualifier
;
ret
=
CRYPT_AsnEncodeSequence
(
dwCertEncodingType
,
items
,
sizeof
(
items
)
/
sizeof
(
items
[
0
]),
dwFlags
&
~
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
NULL
,
&
size
);
...
...
@@ -2847,12 +2845,12 @@ static BOOL WINAPI CRYPT_AsnEncodeCertPolicyQualifiers(DWORD dwCertEncodingType,
CRYPT_EncodeLen
(
bytesNeeded
-
lenBytes
-
1
,
pbEncoded
,
&
lenBytes
);
pbEncoded
+=
lenBytes
;
for
(
i
=
0
;
ret
&&
i
<
cPolicyQualifier
;
i
++
)
for
(
i
=
0
;
ret
&&
i
<
info
->
cPolicyQualifier
;
i
++
)
{
items
[
0
].
pvStructInfo
=
rgPolicyQualifier
[
i
].
pszPolicyQualifierId
;
info
->
rgPolicyQualifier
[
i
].
pszPolicyQualifierId
;
items
[
1
].
pvStructInfo
=
&
rgPolicyQualifier
[
i
].
Qualifier
;
&
info
->
rgPolicyQualifier
[
i
].
Qualifier
;
size
=
bytesNeeded
;
ret
=
CRYPT_AsnEncodeSequence
(
dwCertEncodingType
,
items
,
sizeof
(
items
)
/
sizeof
(
items
[
0
]),
...
...
@@ -2877,7 +2875,7 @@ static BOOL CRYPT_AsnEncodeCertPolicy(DWORD dwCertEncodingType,
{
struct
AsnEncodeSequenceItem
items
[
2
]
=
{
{
info
->
pszPolicyIdentifier
,
CRYPT_AsnEncodeOid
,
0
},
{
&
info
->
cPolicyQualifier
,
CRYPT_AsnEncodeCertPolicyQualifiers
,
0
},
{
info
,
CRYPT_AsnEncodeCertPolicyQualifiers
,
0
},
};
BOOL
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