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
04841e1f
Commit
04841e1f
authored
Oct 08, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Don't hardcode supported OIDs, let CryptDecodeObject handle it directly.
parent
dc34bb9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
36 deletions
+26
-36
softpub.c
dlls/wintrust/softpub.c
+26
-36
No files found.
dlls/wintrust/softpub.c
View file @
04841e1f
...
...
@@ -198,64 +198,54 @@ static DWORD SOFTPUB_DecodeInnerContent(CRYPT_PROVIDER_DATA *data)
{
BOOL
ret
;
DWORD
size
;
LPSTR
oid
=
NULL
;
LPBYTE
buf
=
NULL
;
ret
=
CryptMsgGetParam
(
data
->
hMsg
,
CMSG_INNER_CONTENT_TYPE_PARAM
,
0
,
NULL
,
&
size
);
if
(
!
ret
)
goto
error
;
buf
=
data
->
psPfns
->
pfnAlloc
(
size
);
if
(
!
buf
)
oid
=
data
->
psPfns
->
pfnAlloc
(
size
);
if
(
!
oid
)
{
SetLastError
(
ERROR_OUTOFMEMORY
);
ret
=
FALSE
;
goto
error
;
}
ret
=
CryptMsgGetParam
(
data
->
hMsg
,
CMSG_INNER_CONTENT_TYPE_PARAM
,
0
,
buf
,
ret
=
CryptMsgGetParam
(
data
->
hMsg
,
CMSG_INNER_CONTENT_TYPE_PARAM
,
0
,
oid
,
&
size
);
if
(
!
ret
)
goto
error
;
if
(
!
strcmp
((
LPCSTR
)
buf
,
SPC_INDIRECT_DATA_OBJID
))
ret
=
CryptMsgGetParam
(
data
->
hMsg
,
CMSG_CONTENT_PARAM
,
0
,
NULL
,
&
size
);
if
(
!
ret
)
goto
error
;
buf
=
data
->
psPfns
->
pfnAlloc
(
size
);
if
(
!
buf
)
{
data
->
psPfns
->
pfnFree
(
buf
);
buf
=
NULL
;
ret
=
CryptMsgGetParam
(
data
->
hMsg
,
CMSG_CONTENT_PARAM
,
0
,
NULL
,
&
size
);
if
(
!
ret
)
goto
error
;
buf
=
data
->
psPfns
->
pfnAlloc
(
size
);
if
(
!
buf
)
{
SetLastError
(
ERROR_OUTOFMEMORY
);
ret
=
FALSE
;
goto
error
;
}
ret
=
CryptMsgGetParam
(
data
->
hMsg
,
CMSG_CONTENT_PARAM
,
0
,
buf
,
&
size
);
if
(
!
ret
)
goto
error
;
ret
=
CryptDecodeObject
(
data
->
dwEncoding
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
buf
,
size
,
0
,
NULL
,
&
size
);
if
(
!
ret
)
goto
error
;
data
->
u
.
pPDSip
->
psIndirectData
=
data
->
psPfns
->
pfnAlloc
(
size
);
if
(
!
data
->
u
.
pPDSip
->
psIndirectData
)
{
SetLastError
(
ERROR_OUTOFMEMORY
);
ret
=
FALSE
;
goto
error
;
}
ret
=
CryptDecodeObject
(
data
->
dwEncoding
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
buf
,
size
,
0
,
data
->
u
.
pPDSip
->
psIndirectData
,
&
size
);
SetLastError
(
ERROR_OUTOFMEMORY
);
ret
=
FALSE
;
goto
error
;
}
else
ret
=
CryptMsgGetParam
(
data
->
hMsg
,
CMSG_CONTENT_PARAM
,
0
,
buf
,
&
size
);
if
(
!
ret
)
goto
error
;
ret
=
CryptDecodeObject
(
data
->
dwEncoding
,
oid
,
buf
,
size
,
0
,
NULL
,
&
size
);
if
(
!
ret
)
goto
error
;
data
->
u
.
pPDSip
->
psIndirectData
=
data
->
psPfns
->
pfnAlloc
(
size
);
if
(
!
data
->
u
.
pPDSip
->
psIndirectData
)
{
FIXME
(
"unimplemented for OID %s
\n
"
,
(
LPCSTR
)
buf
);
SetLastError
(
TRUST_E_SUBJECT_FORM_UNKNOWN
);
SetLastError
(
ERROR_OUTOFMEMORY
);
ret
=
FALSE
;
goto
error
;
}
ret
=
CryptDecodeObject
(
data
->
dwEncoding
,
oid
,
buf
,
size
,
0
,
data
->
u
.
pPDSip
->
psIndirectData
,
&
size
);
error:
TRACE
(
"returning %d
\n
"
,
ret
);
data
->
psPfns
->
pfnFree
(
oid
);
data
->
psPfns
->
pfnFree
(
buf
);
return
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