mssign32: Add SignerSignEx stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46903 Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bb83b68832
commit
ec814c1074
|
@ -24,7 +24,7 @@
|
|||
@ stub SignerCreateTimeStampRequest
|
||||
@ stub SignerFreeSignerContext
|
||||
@ stub SignerSign
|
||||
@ stub SignerSignEx
|
||||
@ stdcall SignerSignEx(long ptr ptr ptr ptr wstr ptr ptr ptr)
|
||||
@ stub SignerTimeStamp
|
||||
@ stub SignerTimeStampEx
|
||||
@ stub SpcGetCertFromKey
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "mssign32_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mssign);
|
||||
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv )
|
||||
|
@ -72,3 +74,13 @@ 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;
|
||||
}
|
||||
|
|
|
@ -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;
|
Loading…
Reference in New Issue