https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f3c326b2250409143fd1e…
commit f3c326b2250409143fd1e75b2939cf881404be49
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Nov 10 14:05:55 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Nov 10 14:05:55 2019 +0100
[MSSIGN32] Sync with Wine Staging 4.18. CORE-16441
---
dll/win32/mssign32/mssign32.spec | 4 +-
dll/win32/mssign32/mssign32_main.c | 21 +++++-
dll/win32/mssign32/mssign32_private.h | 124 ++++++++++++++++++++++++++++++++++
media/doc/README.WINE | 2 +-
4 files changed, 146 insertions(+), 5 deletions(-)
diff --git a/dll/win32/mssign32/mssign32.spec b/dll/win32/mssign32/mssign32.spec
index 249b36d301e..43329f57ae9 100644
--- a/dll/win32/mssign32/mssign32.spec
+++ b/dll/win32/mssign32/mssign32.spec
@@ -22,9 +22,9 @@
@ stub SignerAddTimeStampResponse
@ stub SignerAddTimeStampResponseEx
@ stub SignerCreateTimeStampRequest
-@ stub SignerFreeSignerContext
+@ stdcall SignerFreeSignerContext(ptr)
@ stub SignerSign
-@ stub SignerSignEx
+@ stdcall SignerSignEx(long ptr ptr ptr ptr wstr ptr ptr ptr)
@ stub SignerTimeStamp
@ stub SignerTimeStampEx
@ stub SpcGetCertFromKey
diff --git a/dll/win32/mssign32/mssign32_main.c b/dll/win32/mssign32/mssign32_main.c
index e35488bad3e..da7551e6d1b 100644
--- a/dll/win32/mssign32/mssign32_main.c
+++ b/dll/win32/mssign32/mssign32_main.c
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#include "windef.h"
@@ -27,6 +25,9 @@
#include "wincrypt.h"
#include "wine/debug.h"
+#include "wine/heap.h"
+
+#include "mssign32_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(mssign);
@@ -72,3 +73,19 @@ void WINAPI PvkFreeCryptProv(HCRYPTPROV hProv, LPCWSTR
pwszCapiProvider, DWORD d
FIXME("%08lx %s %d %s stub\n", hProv, debugstr_w(pwszCapiProvider),
dwProviderType,
debugstr_w(pwszTmpContainer));
}
+
+HRESULT WINAPI SignerSignEx(DWORD flags, SIGNER_SUBJECT_INFO *subject_info, SIGNER_CERT
*signer_cert,
+ SIGNER_SIGNATURE_INFO *signature_info, SIGNER_PROVIDER_INFO
*provider_info,
+ const WCHAR *http_time_stamp, CRYPT_ATTRIBUTES *request, void
*sip_data,
+ SIGNER_CONTEXT **signer_context)
+{
+ FIXME("%x %p %p %p %p %s %p %p %p stub\n", flags, subject_info,
signer_cert, signature_info, provider_info,
+ wine_dbgstr_w(http_time_stamp), request, sip_data, signer_cert);
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI SignerFreeSignerContext(SIGNER_CONTEXT *signer_context)
+{
+ heap_free(signer_context);
+ return S_OK;
+}
diff --git a/dll/win32/mssign32/mssign32_private.h
b/dll/win32/mssign32/mssign32_private.h
new file mode 100644
index 00000000000..a4e5d360a75
--- /dev/null
+++ b/dll/win32/mssign32/mssign32_private.h
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2019 Gijs Vermeulen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "windef.h"
+#include "winbase.h"
+#include "wincrypt.h"
+
+#define SPC_EXC_PE_PAGE_HASHES_FLAG 0x10
+#define SPC_INC_PE_IMPORT_ADDR_TABLE_FLAG 0x20
+#define SPC_INC_PE_DEBUG_INFO_FLAG 0x40
+#define SPC_INC_PE_RESOURCES_FLAG 0x80
+#define SPC_INC_PE_PAGE_HASHES_FLAG 0x100
+
+#define SIGNER_CERT_SPC_FILE 1
+#define SIGNER_CERT_STORE 2
+#define SIGNER_CERT_SPC_CHAIN 3
+
+#define SIGNER_CERT_POLICY_STORE 0x1
+#define SIGNER_CERT_POLICY_CHAIN 0x2
+#define SIGNER_CERT_POLICY_CHAIN_NO_ROOT 0x8
+
+#define SIGNER_NO_ATTR 0
+#define SIGNER_AUTHCODE_ATTR 1
+
+typedef struct _SIGNER_CONTEXT {
+ DWORD cbSize;
+ DWORD cbBlob;
+ BYTE *pbBlob;
+} SIGNER_CONTEXT, *PSIGNER_CONTEXT;
+
+typedef struct _SIGNER_FILE_INFO {
+ DWORD cbSize;
+ const WCHAR *pwszFileName;
+ HANDLE hFile;
+} SIGNER_FILE_INFO, *PSIGNER_FILE_INFO;
+
+typedef struct _SIGNER_BLOB_INFO {
+ DWORD cbSize;
+ GUID *pGuidSubject;
+ DWORD cbBlob;
+ BYTE *pbBlob;
+ const WCHAR *pwszDisplayName;
+} SIGNER_BLOB_INFO, *PSIGNER_BLOB_INFO;
+
+typedef struct _SIGNER_SUBJECT_INFO {
+ DWORD cbSize;
+ DWORD *pdwIndex;
+ DWORD dwSubjectChoice;
+ union {
+ SIGNER_FILE_INFO *pSignerFileInfo;
+ SIGNER_BLOB_INFO *pSignerBlobInfo;
+ };
+} SIGNER_SUBJECT_INFO, *PSIGNER_SUBJECT_INFO;
+
+typedef struct _SIGNER_CERT_STORE_INFO {
+ DWORD cbSize;
+ const CERT_CONTEXT *pSigningCert;
+ DWORD dwCertPolicy;
+ HCERTSTORE hCertStore;
+} SIGNER_CERT_STORE_INFO, *PSIGNER_CERT_STORE_INFO;
+
+typedef struct _SIGNER_SPC_CHAIN_INFO {
+ DWORD cbSize;
+ const WCHAR *pwszSpcFile;
+ DWORD dwCertPolicy;
+ HCERTSTORE hCertStore;
+} SIGNER_SPC_CHAIN_INFO, *PSIGNER_SPC_CHAIN_INFO;
+
+typedef struct _SIGNER_CERT {
+ DWORD cbSize;
+ DWORD dwCertChoice;
+ union {
+ const WCHAR *pwszSpcFile;
+ SIGNER_CERT_STORE_INFO *pCertStoreInfo;
+ SIGNER_SPC_CHAIN_INFO *pSpcChainInfo;
+ };
+ HWND hwnd;
+} SIGNER_CERT, *PSIGNER_CERT;
+
+typedef struct _SIGNER_ATTR_AUTHCODE {
+ DWORD cbSize;
+ BOOL fCommercial;
+ BOOL fIndividual;
+ const WCHAR *pwszName;
+ const WCHAR *pwszInfo;
+} SIGNER_ATTR_AUTHCODE, *PSIGNER_ATTR_AUTHCODE;
+
+typedef struct _SIGNER_SIGNATURE_INFO {
+ DWORD cbSize;
+ ALG_ID algidHash;
+ DWORD dwAttrChoice;
+ union {
+ SIGNER_ATTR_AUTHCODE *pAttrAuthcode;
+ };
+ CRYPT_ATTRIBUTES *psAuthenticated;
+ CRYPT_ATTRIBUTES *psUnauthenticated;
+} SIGNER_SIGNATURE_INFO, *PSIGNER_SIGNATURE_INFO;
+
+typedef struct _SIGNER_PROVIDER_INFO {
+ DWORD cbSize;
+ const WCHAR *pwszProviderName;
+ DWORD dwProviderType;
+ DWORD dwKeySpec;
+ DWORD dwPvkChoice;
+ union {
+ WCHAR *pwszPvkFileName;
+ WCHAR *pwszKeyContainer;
+ };
+} SIGNER_PROVIDER_INFO, *PSIGNER_PROVIDER_INFO;
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 054faffb38b..94f0d1a1897 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -121,7 +121,7 @@ dll/win32/msisys.ocx # Synced to WineStaging-4.18
dll/win32/msnet32 # Synced to WineStaging-4.18
dll/win32/mspatcha # Forked at WineStaging-3.3
dll/win32/msrle32 # Synced to WineStaging-4.18
-dll/win32/mssign32 # Synced to WineStaging-3.3
+dll/win32/mssign32 # Synced to WineStaging-4.18
dll/win32/mssip32 # Synced to WineStaging-3.3
dll/win32/mstask # Synced to WineStaging-3.3
dll/win32/msvcrt20 # Out of sync