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
8f76cc68
Commit
8f76cc68
authored
Aug 07, 2023
by
Torge Matthies
Committed by
Alexandre Julliard
Aug 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Decode a zero-length OID to an empty string.
Signed-off-by:
Torge Matthies
<
openglfreak@googlemail.com
>
parent
c58c42ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
asn.c
dlls/wintrust/asn.c
+5
-4
asn.c
dlls/wintrust/tests/asn.c
+0
-2
No files found.
dlls/wintrust/asn.c
View file @
8f76cc68
...
...
@@ -1878,6 +1878,8 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType,
}
}
}
else
bytesNeeded
+=
1
;
if
(
!
pvStructInfo
)
*
pcbStructInfo
=
bytesNeeded
;
else
if
(
*
pcbStructInfo
<
bytesNeeded
)
...
...
@@ -1888,12 +1890,13 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType,
}
else
{
LPSTR
pszObjId
=
*
(
LPSTR
*
)
pvStructInfo
;
*
pszObjId
=
0
;
if
(
dataLen
)
{
const
BYTE
*
ptr
;
LPSTR
pszObjId
=
*
(
LPSTR
*
)
pvStructInfo
;
*
pszObjId
=
0
;
pszObjId
+=
sprintf
(
pszObjId
,
"%d.%d"
,
pbEncoded
[
1
+
lenBytes
]
/
40
,
pbEncoded
[
1
+
lenBytes
]
-
(
pbEncoded
[
1
+
lenBytes
]
/
40
)
*
40
);
...
...
@@ -1914,8 +1917,6 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType,
pszObjId
+=
sprintf
(
pszObjId
,
".%d"
,
val
);
}
}
else
*
(
LPSTR
*
)
pvStructInfo
=
NULL
;
*
pcbStructInfo
=
bytesNeeded
;
}
}
...
...
dlls/wintrust/tests/asn.c
View file @
8f76cc68
...
...
@@ -682,13 +682,11 @@ static void test_decodeSPCIndirectDataContent(void)
if
(
ret
)
{
indirectData
=
(
SPC_INDIRECT_DATA_CONTENT
*
)
buf
;
todo_wine
ok
(
indirectData
->
Data
.
pszObjId
!=
NULL
,
"Expected non-NULL data objid
\n
"
);
if
(
indirectData
->
Data
.
pszObjId
)
ok
(
!
strcmp
(
indirectData
->
Data
.
pszObjId
,
""
),
"Expected empty data objid
\n
"
);
ok
(
indirectData
->
Data
.
Value
.
cbData
==
0
,
"Expected no data value
\n
"
);
todo_wine
ok
(
indirectData
->
DigestAlgorithm
.
pszObjId
!=
NULL
,
"Expected non-NULL digest algorithm objid
\n
"
);
if
(
indirectData
->
DigestAlgorithm
.
pszObjId
)
...
...
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