Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
25f0fb92
Commit
25f0fb92
authored
Aug 10, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Implement CryptSIPGetSignedDataMsg.
parent
3a50b1fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
2 deletions
+63
-2
Makefile.in
dlls/wintrust/Makefile.in
+1
-0
crypt.c
dlls/wintrust/crypt.c
+62
-2
No files found.
dlls/wintrust/Makefile.in
View file @
25f0fb92
...
@@ -5,6 +5,7 @@ VPATH = @srcdir@
...
@@ -5,6 +5,7 @@ VPATH = @srcdir@
MODULE
=
wintrust.dll
MODULE
=
wintrust.dll
IMPORTLIB
=
libwintrust.
$(IMPLIBEXT)
IMPORTLIB
=
libwintrust.
$(IMPLIBEXT)
IMPORTS
=
crypt32 user32 advapi32 kernel32
IMPORTS
=
crypt32 user32 advapi32 kernel32
DELAYIMPORTS
=
imagehlp
C_SRCS
=
\
C_SRCS
=
\
crypt.c
\
crypt.c
\
...
...
dlls/wintrust/crypt.c
View file @
25f0fb92
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "wintrust.h"
#include "wintrust.h"
#include "mscat.h"
#include "mscat.h"
#include "mssip.h"
#include "mssip.h"
#include "imagehlp.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -200,10 +201,69 @@ BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pcb
...
@@ -200,10 +201,69 @@ BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pcb
BOOL
WINAPI
CryptSIPGetSignedDataMsg
(
SIP_SUBJECTINFO
*
pSubjectInfo
,
DWORD
*
pdwEncodingType
,
BOOL
WINAPI
CryptSIPGetSignedDataMsg
(
SIP_SUBJECTINFO
*
pSubjectInfo
,
DWORD
*
pdwEncodingType
,
DWORD
dwIndex
,
DWORD
*
pcbSignedDataMsg
,
BYTE
*
pbSignedDataMsg
)
DWORD
dwIndex
,
DWORD
*
pcbSignedDataMsg
,
BYTE
*
pbSignedDataMsg
)
{
{
FIXME
(
"(%p %p %d %p %p) stub
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
BOOL
ret
;
WIN_CERTIFICATE
*
pCert
=
NULL
;
TRACE
(
"(%p %p %d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
pcbSignedDataMsg
,
pbSignedDataMsg
);
return
FALSE
;
if
(
!
pbSignedDataMsg
)
{
WIN_CERTIFICATE
cert
;
/* app hasn't passed buffer, just get the length */
ret
=
ImageGetCertificateHeader
(
pSubjectInfo
->
hFile
,
dwIndex
,
&
cert
);
if
(
ret
)
*
pcbSignedDataMsg
=
cert
.
dwLength
;
}
else
{
DWORD
len
;
ret
=
ImageGetCertificateData
(
pSubjectInfo
->
hFile
,
dwIndex
,
NULL
,
&
len
);
if
(
!
ret
)
goto
error
;
pCert
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
pCert
)
{
ret
=
FALSE
;
goto
error
;
}
ret
=
ImageGetCertificateData
(
pSubjectInfo
->
hFile
,
dwIndex
,
pCert
,
&
len
);
if
(
!
ret
)
goto
error
;
if
(
!
pbSignedDataMsg
)
*
pcbSignedDataMsg
=
pCert
->
dwLength
;
else
if
(
*
pcbSignedDataMsg
<
pCert
->
dwLength
)
{
*
pcbSignedDataMsg
=
pCert
->
dwLength
;
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
ret
=
FALSE
;
}
else
{
memcpy
(
pbSignedDataMsg
,
pCert
->
bCertificate
,
pCert
->
dwLength
);
switch
(
pCert
->
wCertificateType
)
{
case
WIN_CERT_TYPE_X509
:
*
pdwEncodingType
=
X509_ASN_ENCODING
;
break
;
case
WIN_CERT_TYPE_PKCS_SIGNED_DATA
:
*
pdwEncodingType
=
X509_ASN_ENCODING
|
PKCS_7_ASN_ENCODING
;
break
;
default:
FIXME
(
"don't know what to do for encoding type %d
\n
"
,
pCert
->
wCertificateType
);
*
pdwEncodingType
=
0
;
}
}
}
error:
HeapFree
(
GetProcessHeap
(),
0
,
pCert
);
TRACE
(
"returning %d
\n
"
,
ret
);
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