[MSSIGN32] Sync with Wine Staging 4.18. CORE-16441

This commit is contained in:
Amine Khaldi 2019-11-10 14:05:55 +01:00
parent ee39ccec36
commit f3c326b225
4 changed files with 146 additions and 5 deletions

View file

@ -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

View file

@ -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;
}

View file

@ -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;

View file

@ -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