mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 842b38e29166a429d59331be40761335807c85d2.
This commit is contained in:
parent
e002d94a8b
commit
7be9c41c35
@ -1,677 +0,0 @@
|
||||
From bfa13a38c04bf3ef50cca78d0b9bf0e849fb9cc8 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 10 Nov 2020 10:22:19 +0300
|
||||
Subject: [PATCH] crypt32: Fix reading and writing CRYPT_KEY_PROV_INFO
|
||||
certificate property.
|
||||
|
||||
v2: Updated for current git.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50024
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/crypt32/cert.c | 251 +++++++++++++--------------------
|
||||
dlls/crypt32/crypt32_private.h | 8 --
|
||||
dlls/crypt32/serialize.c | 187 +++++++++++++++++++++++-
|
||||
dlls/crypt32/tests/cert.c | 96 +++++++++++++
|
||||
4 files changed, 375 insertions(+), 167 deletions(-)
|
||||
|
||||
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
|
||||
index c0bec721fd1..aad8fa047b7 100644
|
||||
--- a/dlls/crypt32/cert.c
|
||||
+++ b/dlls/crypt32/cert.c
|
||||
@@ -434,6 +434,84 @@ void CRYPT_ConvertKeyContext(const struct store_CERT_KEY_CONTEXT *src, CERT_KEY_
|
||||
dst->dwKeySpec = src->dwKeySpec;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Fix offsets in a continuous block of memory of CRYPT_KEY_PROV_INFO with
|
||||
+ * its associated data.
|
||||
+ */
|
||||
+static void fix_KeyProvInfoProperty(CRYPT_KEY_PROV_INFO *info)
|
||||
+{
|
||||
+ BYTE *data;
|
||||
+ DWORD i;
|
||||
+
|
||||
+ data = (BYTE *)(info + 1) + sizeof(CRYPT_KEY_PROV_PARAM) * info->cProvParam;
|
||||
+
|
||||
+ if (info->pwszContainerName)
|
||||
+ {
|
||||
+ info->pwszContainerName = (LPWSTR)data;
|
||||
+ data += (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+
|
||||
+ if (info->pwszProvName)
|
||||
+ {
|
||||
+ info->pwszProvName = (LPWSTR)data;
|
||||
+ data += (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+
|
||||
+ info->rgProvParam = info->cProvParam ? (CRYPT_KEY_PROV_PARAM *)(info + 1) : NULL;
|
||||
+
|
||||
+ for (i = 0; i < info->cProvParam; i++)
|
||||
+ {
|
||||
+ info->rgProvParam[i].pbData = info->rgProvParam[i].cbData ? data : NULL;
|
||||
+ data += info->rgProvParam[i].cbData;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Copy to a continuous block of memory of CRYPT_KEY_PROV_INFO with
|
||||
+ * its associated data.
|
||||
+ */
|
||||
+static void copy_KeyProvInfoProperty(const CRYPT_KEY_PROV_INFO *from, CRYPT_KEY_PROV_INFO *to)
|
||||
+{
|
||||
+ BYTE *data;
|
||||
+ DWORD i;
|
||||
+
|
||||
+ data = (BYTE *)(to + 1) + sizeof(CRYPT_KEY_PROV_PARAM) * from->cProvParam;
|
||||
+
|
||||
+ if (from->pwszContainerName)
|
||||
+ {
|
||||
+ to->pwszContainerName = (LPWSTR)data;
|
||||
+ lstrcpyW((LPWSTR)data, from->pwszContainerName);
|
||||
+ data += (lstrlenW(from->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+ else
|
||||
+ to->pwszContainerName = NULL;
|
||||
+
|
||||
+ if (from->pwszProvName)
|
||||
+ {
|
||||
+ to->pwszProvName = (LPWSTR)data;
|
||||
+ lstrcpyW((LPWSTR)data, from->pwszProvName);
|
||||
+ data += (lstrlenW(from->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+ else
|
||||
+ to->pwszProvName = NULL;
|
||||
+
|
||||
+ to->dwProvType = from->dwProvType;
|
||||
+ to->dwFlags = from->dwFlags;
|
||||
+ to->cProvParam = from->cProvParam;
|
||||
+ to->rgProvParam = from->cProvParam ? (CRYPT_KEY_PROV_PARAM *)(to + 1) : NULL;
|
||||
+ to->dwKeySpec = from->dwKeySpec;
|
||||
+
|
||||
+ for (i = 0; i < from->cProvParam; i++)
|
||||
+ {
|
||||
+ to->rgProvParam[i].dwParam = from->rgProvParam[i].dwParam;
|
||||
+ to->rgProvParam[i].dwFlags = from->rgProvParam[i].dwFlags;
|
||||
+ to->rgProvParam[i].cbData = from->rgProvParam[i].cbData;
|
||||
+ to->rgProvParam[i].pbData = from->rgProvParam[i].cbData ? data : NULL;
|
||||
+ memcpy(data, from->rgProvParam[i].pbData, from->rgProvParam[i].cbData);
|
||||
+ data += from->rgProvParam[i].cbData;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static BOOL CertContext_GetProperty(cert_t *cert, DWORD dwPropId,
|
||||
void *pvData, DWORD *pcbData)
|
||||
{
|
||||
@@ -535,87 +613,6 @@ static BOOL CertContext_GetProperty(cert_t *cert, DWORD dwPropId,
|
||||
return ret;
|
||||
}
|
||||
|
||||
-/* 64-bit compatible layout, so that 64-bit crypt32 is able to read
|
||||
- * the structure saved by 32-bit crypt32.
|
||||
- */
|
||||
-typedef struct
|
||||
-{
|
||||
- ULONG64 pwszContainerName;
|
||||
- ULONG64 pwszProvName;
|
||||
- DWORD dwProvType;
|
||||
- DWORD dwFlags;
|
||||
- DWORD cProvParam;
|
||||
- ULONG64 rgProvParam;
|
||||
- DWORD dwKeySpec;
|
||||
-} store_CRYPT_KEY_PROV_INFO;
|
||||
-
|
||||
-typedef struct
|
||||
-{
|
||||
- DWORD dwParam;
|
||||
- ULONG64 pbData;
|
||||
- DWORD cbData;
|
||||
- DWORD dwFlags;
|
||||
-} store_CRYPT_KEY_PROV_PARAM;
|
||||
-
|
||||
-void CRYPT_FixKeyProvInfoPointers(PCRYPT_KEY_PROV_INFO buf)
|
||||
-{
|
||||
- CRYPT_KEY_PROV_INFO info;
|
||||
- store_CRYPT_KEY_PROV_INFO *store = (store_CRYPT_KEY_PROV_INFO *)buf;
|
||||
- BYTE *p = (BYTE *)(store + 1);
|
||||
-
|
||||
- if (store->pwszContainerName)
|
||||
- {
|
||||
- info.pwszContainerName = (LPWSTR)((BYTE *)store + store->pwszContainerName);
|
||||
- p += (lstrlenW(info.pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
- }
|
||||
- else
|
||||
- info.pwszContainerName = NULL;
|
||||
-
|
||||
- if (store->pwszProvName)
|
||||
- {
|
||||
- info.pwszProvName = (LPWSTR)((BYTE *)store + store->pwszProvName);
|
||||
- p += (lstrlenW(info.pwszProvName) + 1) * sizeof(WCHAR);
|
||||
- }
|
||||
- else
|
||||
- info.pwszProvName = NULL;
|
||||
-
|
||||
- info.dwProvType = store->dwProvType;
|
||||
- info.dwFlags = store->dwFlags;
|
||||
- info.dwKeySpec = store->dwKeySpec;
|
||||
- info.cProvParam = store->cProvParam;
|
||||
-
|
||||
- if (info.cProvParam)
|
||||
- {
|
||||
- DWORD i;
|
||||
-
|
||||
- info.rgProvParam = (CRYPT_KEY_PROV_PARAM *)p;
|
||||
-
|
||||
- for (i = 0; i < store->cProvParam; i++)
|
||||
- {
|
||||
- CRYPT_KEY_PROV_PARAM param;
|
||||
- store_CRYPT_KEY_PROV_PARAM *store_param;
|
||||
-
|
||||
- store_param = (store_CRYPT_KEY_PROV_PARAM *)p;
|
||||
- p += sizeof(*store_param);
|
||||
-
|
||||
- param.dwParam = store_param[i].dwParam;
|
||||
- param.dwFlags = store_param[i].dwFlags;
|
||||
- param.cbData = store_param[i].cbData;
|
||||
- param.pbData = param.cbData ? p : NULL;
|
||||
- p += store_param[i].cbData;
|
||||
-
|
||||
- memcpy(&info.rgProvParam[i], ¶m, sizeof(param));
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- info.rgProvParam = NULL;
|
||||
-
|
||||
- TRACE("%s,%s,%u,%08x,%u,%p,%u\n", debugstr_w(info.pwszContainerName), debugstr_w(info.pwszProvName),
|
||||
- info.dwProvType, info.dwFlags, info.cProvParam, info.rgProvParam, info.dwKeySpec);
|
||||
-
|
||||
- *buf = info;
|
||||
-}
|
||||
-
|
||||
BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
|
||||
DWORD dwPropId, void *pvData, DWORD *pcbData)
|
||||
{
|
||||
@@ -649,10 +646,9 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
|
||||
break;
|
||||
}
|
||||
case CERT_KEY_PROV_INFO_PROP_ID:
|
||||
- ret = CertContext_GetProperty(cert, dwPropId, pvData,
|
||||
- pcbData);
|
||||
+ ret = CertContext_GetProperty(cert, dwPropId, pvData, pcbData);
|
||||
if (ret && pvData)
|
||||
- CRYPT_FixKeyProvInfoPointers(pvData);
|
||||
+ fix_KeyProvInfoProperty(pvData);
|
||||
break;
|
||||
default:
|
||||
ret = CertContext_GetProperty(cert, dwPropId, pvData,
|
||||
@@ -663,69 +659,14 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
|
||||
return ret;
|
||||
}
|
||||
|
||||
-/* Copies key provider info from from into to, where to is assumed to be a
|
||||
- * contiguous buffer of memory large enough for from and all its associated
|
||||
- * data, but whose pointers are uninitialized.
|
||||
- * Upon return, to contains a contiguous copy of from, packed in the following
|
||||
- * order:
|
||||
- * - store_CRYPT_KEY_PROV_INFO
|
||||
- * - pwszContainerName
|
||||
- * - pwszProvName
|
||||
- * - store_CRYPT_KEY_PROV_PARAM[0]
|
||||
- * - store_CRYPT_KEY_PROV_PARAM[0].data
|
||||
- * - ...
|
||||
+/*
|
||||
+ * Create a continuous block of memory for CRYPT_KEY_PROV_INFO with
|
||||
+ * its associated data, and add it to the certificate properties.
|
||||
*/
|
||||
-static void CRYPT_CopyKeyProvInfo(store_CRYPT_KEY_PROV_INFO *to, const CRYPT_KEY_PROV_INFO *from)
|
||||
+static BOOL CertContext_SetKeyProvInfoProperty(CONTEXT_PROPERTY_LIST *properties, const CRYPT_KEY_PROV_INFO *info)
|
||||
{
|
||||
- DWORD i;
|
||||
- BYTE *p;
|
||||
- store_CRYPT_KEY_PROV_PARAM *param;
|
||||
-
|
||||
- p = (BYTE *)(to + 1);
|
||||
-
|
||||
- if (from->pwszContainerName)
|
||||
- {
|
||||
- to->pwszContainerName = p - (BYTE *)to;
|
||||
- lstrcpyW((LPWSTR)p, from->pwszContainerName);
|
||||
- p += (lstrlenW(from->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
- }
|
||||
- else
|
||||
- to->pwszContainerName = 0;
|
||||
-
|
||||
- if (from->pwszProvName)
|
||||
- {
|
||||
- to->pwszProvName = p - (BYTE *)to;
|
||||
- lstrcpyW((LPWSTR)p, from->pwszProvName);
|
||||
- p += (lstrlenW(from->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
- }
|
||||
- else
|
||||
- to->pwszProvName = 0;
|
||||
-
|
||||
- to->dwProvType = from->dwProvType;
|
||||
- to->dwFlags = from->dwFlags;
|
||||
- to->cProvParam = from->cProvParam;
|
||||
- to->rgProvParam = 0;
|
||||
- to->dwKeySpec = from->dwKeySpec;
|
||||
-
|
||||
- for (i = 0; i < to->cProvParam; i++)
|
||||
- {
|
||||
- param = (store_CRYPT_KEY_PROV_PARAM *)p;
|
||||
- p += sizeof(*param);
|
||||
-
|
||||
- param->dwParam = from->rgProvParam[i].dwParam;
|
||||
- param->pbData = 0;
|
||||
- param->cbData = from->rgProvParam[i].cbData;
|
||||
- param->dwFlags = from->rgProvParam[i].dwFlags;
|
||||
- memcpy(p, from->rgProvParam[i].pbData, from->rgProvParam[i].cbData);
|
||||
- p += from->rgProvParam[i].cbData;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static BOOL CertContext_SetKeyProvInfoProperty(CONTEXT_PROPERTY_LIST *properties,
|
||||
- const CRYPT_KEY_PROV_INFO *info)
|
||||
-{
|
||||
- BYTE *buf;
|
||||
- DWORD size = sizeof(store_CRYPT_KEY_PROV_INFO), i;
|
||||
+ CRYPT_KEY_PROV_INFO *prop;
|
||||
+ DWORD size = sizeof(CRYPT_KEY_PROV_INFO), i;
|
||||
BOOL ret;
|
||||
|
||||
if (info->pwszContainerName)
|
||||
@@ -734,18 +675,20 @@ static BOOL CertContext_SetKeyProvInfoProperty(CONTEXT_PROPERTY_LIST *properties
|
||||
size += (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
|
||||
for (i = 0; i < info->cProvParam; i++)
|
||||
- size += sizeof(store_CRYPT_KEY_PROV_PARAM) + info->rgProvParam[i].cbData;
|
||||
+ size += sizeof(CRYPT_KEY_PROV_PARAM) + info->rgProvParam[i].cbData;
|
||||
|
||||
- buf = CryptMemAlloc(size);
|
||||
- if (buf)
|
||||
+ prop = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ if (!prop)
|
||||
{
|
||||
- CRYPT_CopyKeyProvInfo((store_CRYPT_KEY_PROV_INFO *)buf, info);
|
||||
- ret = ContextPropertyList_SetProperty(properties,
|
||||
- CERT_KEY_PROV_INFO_PROP_ID, buf, size);
|
||||
- CryptMemFree(buf);
|
||||
+ SetLastError(ERROR_OUTOFMEMORY);
|
||||
+ return FALSE;
|
||||
}
|
||||
- else
|
||||
- ret = FALSE;
|
||||
+
|
||||
+ copy_KeyProvInfoProperty(info, prop);
|
||||
+
|
||||
+ ret = ContextPropertyList_SetProperty(properties, CERT_KEY_PROV_INFO_PROP_ID, (const BYTE *)prop, size);
|
||||
+ HeapFree(GetProcessHeap(), 0, prop);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h
|
||||
index a4664ed85a9..30cf4334de4 100644
|
||||
--- a/dlls/crypt32/crypt32_private.h
|
||||
+++ b/dlls/crypt32/crypt32_private.h
|
||||
@@ -370,14 +370,6 @@ BOOL CRYPT_ReadSerializedStoreFromFile(HANDLE file, HCERTSTORE store) DECLSPEC_H
|
||||
BOOL CRYPT_ReadSerializedStoreFromBlob(const CRYPT_DATA_BLOB *blob,
|
||||
HCERTSTORE store) DECLSPEC_HIDDEN;
|
||||
|
||||
-/* Fixes up the pointers in info, where info is assumed to be a
|
||||
- * CRYPT_KEY_PROV_INFO, followed by its container name, provider name, and any
|
||||
- * provider parameters, in a contiguous buffer, but where info's pointers are
|
||||
- * assumed to be invalid. Upon return, info's pointers point to the
|
||||
- * appropriate memory locations.
|
||||
- */
|
||||
-void CRYPT_FixKeyProvInfoPointers(PCRYPT_KEY_PROV_INFO info) DECLSPEC_HIDDEN;
|
||||
-
|
||||
struct store_CERT_KEY_CONTEXT
|
||||
{
|
||||
DWORD cbSize;
|
||||
diff --git a/dlls/crypt32/serialize.c b/dlls/crypt32/serialize.c
|
||||
index d5153deb106..8fa24370b65 100644
|
||||
--- a/dlls/crypt32/serialize.c
|
||||
+++ b/dlls/crypt32/serialize.c
|
||||
@@ -36,6 +36,86 @@ typedef struct _WINE_CERT_PROP_HEADER
|
||||
DWORD cb;
|
||||
} WINE_CERT_PROP_HEADER;
|
||||
|
||||
+struct store_CRYPT_KEY_PROV_INFO
|
||||
+{
|
||||
+ DWORD pwszContainerName;
|
||||
+ DWORD pwszProvName;
|
||||
+ DWORD dwProvType;
|
||||
+ DWORD dwFlags;
|
||||
+ DWORD cProvParam;
|
||||
+ DWORD rgProvParam;
|
||||
+ DWORD dwKeySpec;
|
||||
+};
|
||||
+
|
||||
+struct store_CRYPT_KEY_PROV_PARAM
|
||||
+{
|
||||
+ DWORD dwParam;
|
||||
+ DWORD pbData;
|
||||
+ DWORD cbData;
|
||||
+ DWORD dwFlags;
|
||||
+};
|
||||
+
|
||||
+static DWORD serialize_KeyProvInfoProperty(const CRYPT_KEY_PROV_INFO *info, struct store_CRYPT_KEY_PROV_INFO **ret)
|
||||
+{
|
||||
+ struct store_CRYPT_KEY_PROV_INFO *store;
|
||||
+ struct store_CRYPT_KEY_PROV_PARAM *param;
|
||||
+ DWORD size = sizeof(struct store_CRYPT_KEY_PROV_INFO), i;
|
||||
+ BYTE *data;
|
||||
+
|
||||
+ if (info->pwszContainerName)
|
||||
+ size += (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
+ if (info->pwszProvName)
|
||||
+ size += (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
+
|
||||
+ for (i = 0; i < info->cProvParam; i++)
|
||||
+ size += sizeof(struct store_CRYPT_KEY_PROV_PARAM) + info->rgProvParam[i].cbData;
|
||||
+
|
||||
+ if (!ret) return size;
|
||||
+
|
||||
+ store = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ if (!store) return 0;
|
||||
+
|
||||
+ param = (struct store_CRYPT_KEY_PROV_PARAM *)(store + 1);
|
||||
+ data = (BYTE *)param + sizeof(struct store_CRYPT_KEY_PROV_PARAM) * info->cProvParam;
|
||||
+
|
||||
+ if (info->pwszContainerName)
|
||||
+ {
|
||||
+ store->pwszContainerName = data - (BYTE *)store;
|
||||
+ lstrcpyW((LPWSTR)data, info->pwszContainerName);
|
||||
+ data += (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+ else
|
||||
+ store->pwszContainerName = 0;
|
||||
+
|
||||
+ if (info->pwszProvName)
|
||||
+ {
|
||||
+ store->pwszProvName = data - (BYTE *)store;
|
||||
+ lstrcpyW((LPWSTR)data, info->pwszProvName);
|
||||
+ data += (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+ else
|
||||
+ store->pwszProvName = 0;
|
||||
+
|
||||
+ store->dwProvType = info->dwProvType;
|
||||
+ store->dwFlags = info->dwFlags;
|
||||
+ store->cProvParam = info->cProvParam;
|
||||
+ store->rgProvParam = info->cProvParam ? (BYTE *)param - (BYTE *)store : 0;
|
||||
+ store->dwKeySpec = info->dwKeySpec;
|
||||
+
|
||||
+ for (i = 0; i < info->cProvParam; i++)
|
||||
+ {
|
||||
+ param[i].dwParam = info->rgProvParam[i].dwParam;
|
||||
+ param[i].dwFlags = info->rgProvParam[i].dwFlags;
|
||||
+ param[i].cbData = info->rgProvParam[i].cbData;
|
||||
+ param[i].pbData = param[i].cbData ? data - (BYTE *)store : 0;
|
||||
+ memcpy(data, info->rgProvParam[i].pbData, info->rgProvParam[i].cbData);
|
||||
+ data += info->rgProvParam[i].cbData;
|
||||
+ }
|
||||
+
|
||||
+ *ret = store;
|
||||
+ return size;
|
||||
+}
|
||||
+
|
||||
static BOOL CRYPT_SerializeStoreElement(const void *context,
|
||||
const BYTE *encodedContext, DWORD cbEncodedContext, DWORD contextPropID,
|
||||
const WINE_CONTEXT_INTERFACE *contextInterface, DWORD dwFlags, BOOL omitHashes,
|
||||
@@ -60,7 +140,16 @@ static BOOL CRYPT_SerializeStoreElement(const void *context,
|
||||
|
||||
ret = contextInterface->getProp(context, prop, NULL, &propSize);
|
||||
if (ret)
|
||||
+ {
|
||||
+ if (prop == CERT_KEY_PROV_INFO_PROP_ID)
|
||||
+ {
|
||||
+ BYTE *info = CryptMemAlloc(propSize);
|
||||
+ contextInterface->getProp(context, prop, info, &propSize);
|
||||
+ propSize = serialize_KeyProvInfoProperty((const CRYPT_KEY_PROV_INFO *)info, NULL);
|
||||
+ CryptMemFree(info);
|
||||
+ }
|
||||
bytesNeeded += sizeof(WINE_CERT_PROP_HEADER) + propSize;
|
||||
+ }
|
||||
}
|
||||
} while (ret && prop != 0);
|
||||
|
||||
@@ -106,6 +195,14 @@ static BOOL CRYPT_SerializeStoreElement(const void *context,
|
||||
&propSize);
|
||||
if (ret)
|
||||
{
|
||||
+ if (prop == CERT_KEY_PROV_INFO_PROP_ID)
|
||||
+ {
|
||||
+ struct store_CRYPT_KEY_PROV_INFO *store;
|
||||
+ propSize = serialize_KeyProvInfoProperty((const CRYPT_KEY_PROV_INFO *)buf, &store);
|
||||
+ CryptMemFree(buf);
|
||||
+ buf = (BYTE *)store;
|
||||
+ }
|
||||
+
|
||||
hdr = (WINE_CERT_PROP_HEADER*)pbElement;
|
||||
hdr->propID = prop;
|
||||
hdr->unknown = 1;
|
||||
@@ -215,6 +312,83 @@ static const WINE_CERT_PROP_HEADER *CRYPT_findPropID(const BYTE *buf,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static DWORD read_serialized_KeyProvInfoProperty(const struct store_CRYPT_KEY_PROV_INFO *store, CRYPT_KEY_PROV_INFO **ret)
|
||||
+{
|
||||
+ const struct store_CRYPT_KEY_PROV_PARAM *param;
|
||||
+ CRYPT_KEY_PROV_INFO *info;
|
||||
+ DWORD size = sizeof(CRYPT_KEY_PROV_INFO), i;
|
||||
+ const BYTE *base;
|
||||
+ BYTE *data;
|
||||
+
|
||||
+ base = (const BYTE *)store;
|
||||
+ param = (const struct store_CRYPT_KEY_PROV_PARAM *)(base + store->rgProvParam);
|
||||
+
|
||||
+ if (store->pwszContainerName)
|
||||
+ size += (lstrlenW((LPCWSTR)(base + store->pwszContainerName)) + 1) * sizeof(WCHAR);
|
||||
+ if (store->pwszProvName)
|
||||
+ size += (lstrlenW((LPCWSTR)(base + store->pwszProvName)) + 1) * sizeof(WCHAR);
|
||||
+
|
||||
+ for (i = 0; i < store->cProvParam; i++)
|
||||
+ size += sizeof(CRYPT_KEY_PROV_PARAM) + param[i].cbData;
|
||||
+
|
||||
+ info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ if (!info)
|
||||
+ {
|
||||
+ SetLastError(ERROR_OUTOFMEMORY);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ data = (BYTE *)(info + 1) + sizeof(CRYPT_KEY_PROV_PARAM) * store->cProvParam;
|
||||
+
|
||||
+ if (store->pwszContainerName)
|
||||
+ {
|
||||
+ info->pwszContainerName = (LPWSTR)data;
|
||||
+ lstrcpyW(info->pwszContainerName, (LPCWSTR)((const BYTE *)store + store->pwszContainerName));
|
||||
+ data += (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+ else
|
||||
+ info->pwszContainerName = NULL;
|
||||
+
|
||||
+ if (store->pwszProvName)
|
||||
+ {
|
||||
+ info->pwszProvName = (LPWSTR)data;
|
||||
+ lstrcpyW(info->pwszProvName, (LPCWSTR)((const BYTE *)store + store->pwszProvName));
|
||||
+ data += (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
+ }
|
||||
+ else
|
||||
+ info->pwszProvName = NULL;
|
||||
+
|
||||
+ info->dwProvType = store->dwProvType;
|
||||
+ info->dwFlags = store->dwFlags;
|
||||
+ info->dwKeySpec = store->dwKeySpec;
|
||||
+ info->cProvParam = store->cProvParam;
|
||||
+
|
||||
+ if (info->cProvParam)
|
||||
+ {
|
||||
+ DWORD i;
|
||||
+
|
||||
+ info->rgProvParam = (CRYPT_KEY_PROV_PARAM *)(info + 1);
|
||||
+
|
||||
+ for (i = 0; i < info->cProvParam; i++)
|
||||
+ {
|
||||
+ info->rgProvParam[i].dwParam = param[i].dwParam;
|
||||
+ info->rgProvParam[i].dwFlags = param[i].dwFlags;
|
||||
+ info->rgProvParam[i].cbData = param[i].cbData;
|
||||
+ info->rgProvParam[i].pbData = param[i].cbData ? data : NULL;
|
||||
+ memcpy(info->rgProvParam[i].pbData, base + param[i].pbData, param[i].cbData);
|
||||
+ data += param[i].cbData;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ info->rgProvParam = NULL;
|
||||
+
|
||||
+ TRACE("%s,%s,%u,%08x,%u,%p,%u\n", debugstr_w(info->pwszContainerName), debugstr_w(info->pwszProvName),
|
||||
+ info->dwProvType, info->dwFlags, info->cProvParam, info->rgProvParam, info->dwKeySpec);
|
||||
+
|
||||
+ *ret = info;
|
||||
+ return size;
|
||||
+}
|
||||
+
|
||||
static BOOL CRYPT_ReadContextProp(
|
||||
const WINE_CONTEXT_INTERFACE *contextInterface, const void *context,
|
||||
const WINE_CERT_PROP_HEADER *hdr, const BYTE *pbElement, DWORD cbElement)
|
||||
@@ -269,12 +443,15 @@ static BOOL CRYPT_ReadContextProp(
|
||||
break;
|
||||
case CERT_KEY_PROV_INFO_PROP_ID:
|
||||
{
|
||||
- PCRYPT_KEY_PROV_INFO info =
|
||||
- (PCRYPT_KEY_PROV_INFO)pbElement;
|
||||
+ CRYPT_KEY_PROV_INFO *info;
|
||||
|
||||
- CRYPT_FixKeyProvInfoPointers(info);
|
||||
- ret = contextInterface->setProp(context,
|
||||
- hdr->propID, 0, pbElement);
|
||||
+ if (read_serialized_KeyProvInfoProperty((const struct store_CRYPT_KEY_PROV_INFO *)pbElement, &info))
|
||||
+ {
|
||||
+ ret = contextInterface->setProp(context, hdr->propID, 0, info);
|
||||
+ CryptMemFree(info);
|
||||
+ }
|
||||
+ else
|
||||
+ ret = FALSE;
|
||||
break;
|
||||
}
|
||||
case CERT_KEY_CONTEXT_PROP_ID:
|
||||
diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c
|
||||
index d9f839c72d2..745770f0095 100644
|
||||
--- a/dlls/crypt32/tests/cert.c
|
||||
+++ b/dlls/crypt32/tests/cert.c
|
||||
@@ -4142,6 +4142,101 @@ static void testGetPublicKeyLength(void)
|
||||
"Expected length 56, got %d\n", ret);
|
||||
}
|
||||
|
||||
+static void testKeyProvInfo(void)
|
||||
+{
|
||||
+ static WCHAR containerW[] = L"Wine Test Container";
|
||||
+ static WCHAR providerW[] = L"Hello World CSP";
|
||||
+ static CRYPT_KEY_PROV_PARAM param[2] = { { 0x4444, (BYTE *)"param", 6, 0x5555 }, { 0x7777, (BYTE *)"param2", 7, 0x8888 } };
|
||||
+ HCERTSTORE store;
|
||||
+ const CERT_CONTEXT *cert;
|
||||
+ CERT_NAME_BLOB name;
|
||||
+ CRYPT_KEY_PROV_INFO *info, info2;
|
||||
+ BOOL ret;
|
||||
+ DWORD size;
|
||||
+
|
||||
+ store = CertOpenStore(CERT_STORE_PROV_SYSTEM_A, 0, 0,
|
||||
+ CERT_SYSTEM_STORE_CURRENT_USER, "My");
|
||||
+ ok(store != NULL, "CertOpenStore error %u\n", GetLastError());
|
||||
+
|
||||
+ cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, sizeof(selfSignedCert));
|
||||
+ ok(cert != NULL, "CertCreateCertificateContext error %#x\n", GetLastError());
|
||||
+
|
||||
+ info2.pwszContainerName = containerW;
|
||||
+ info2.pwszProvName = providerW;
|
||||
+ info2.dwProvType = 0x12345678;
|
||||
+ info2.dwFlags = 0x87654321;
|
||||
+ info2.cProvParam = ARRAY_SIZE(param);
|
||||
+ info2.rgProvParam = param;
|
||||
+ info2.dwKeySpec = 0x11223344;
|
||||
+ ret = CertSetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, 0, &info2);
|
||||
+ ok(ret, "CertSetCertificateContextProperty error %#x\n", GetLastError());
|
||||
+
|
||||
+ ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, NULL, &size);
|
||||
+ ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError());
|
||||
+ info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, info, &size);
|
||||
+ ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError());
|
||||
+ ok(!lstrcmpW(info->pwszContainerName, containerW), "got %s\n", wine_dbgstr_w(info->pwszContainerName));
|
||||
+ ok(!lstrcmpW(info->pwszProvName, providerW), "got %s\n", wine_dbgstr_w(info->pwszProvName));
|
||||
+ ok(info->dwProvType == 0x12345678, "got %#x\n", info->dwProvType);
|
||||
+ ok(info->dwFlags == 0x87654321, "got %#x\n", info->dwFlags);
|
||||
+ ok(info->dwKeySpec == 0x11223344, "got %#x\n", info->dwKeySpec);
|
||||
+ ok(info->cProvParam == 2, "got %#x\n", info->cProvParam);
|
||||
+ ok(info->rgProvParam != NULL, "got %p\n", info->rgProvParam);
|
||||
+ ok(info->rgProvParam[0].dwParam == param[0].dwParam, "got %#x\n", info->rgProvParam[0].dwParam);
|
||||
+ ok(info->rgProvParam[0].cbData == param[0].cbData, "got %#x\n", info->rgProvParam[0].cbData);
|
||||
+ ok(!memcmp(info->rgProvParam[0].pbData, param[0].pbData, param[0].cbData), "param1 mismatch\n");
|
||||
+ ok(info->rgProvParam[0].dwFlags == param[0].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags);
|
||||
+ ok(info->rgProvParam[1].dwParam == param[1].dwParam, "got %#x\n", info->rgProvParam[1].dwParam);
|
||||
+ ok(info->rgProvParam[1].cbData == param[1].cbData, "got %#x\n", info->rgProvParam[1].cbData);
|
||||
+ ok(!memcmp(info->rgProvParam[1].pbData, param[1].pbData, param[1].cbData), "param2 mismatch\n");
|
||||
+ ok(info->rgProvParam[1].dwFlags == param[1].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags);
|
||||
+ HeapFree(GetProcessHeap(), 0, info);
|
||||
+
|
||||
+ ret = CertAddCertificateContextToStore(store, cert, CERT_STORE_ADD_NEW, NULL);
|
||||
+ ok(ret, "CertAddCertificateContextToStore error %#x\n", GetLastError());
|
||||
+
|
||||
+ CertFreeCertificateContext(cert);
|
||||
+ CertCloseStore(store, 0);
|
||||
+
|
||||
+ store = CertOpenStore(CERT_STORE_PROV_SYSTEM_A, 0, 0,
|
||||
+ CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, "My");
|
||||
+ ok(store != NULL, "CertOpenStore error %u\n", GetLastError());
|
||||
+
|
||||
+ name.pbData = subjectName;
|
||||
+ name.cbData = sizeof(subjectName);
|
||||
+ cert = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_SUBJECT_NAME, &name, NULL);
|
||||
+ ok(cert != NULL, "certificate should exist in My store\n");
|
||||
+
|
||||
+ ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, NULL, &size);
|
||||
+ ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError());
|
||||
+ info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, info, &size);
|
||||
+ ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError());
|
||||
+ ok(!lstrcmpW(info->pwszContainerName, containerW), "got %s\n", wine_dbgstr_w(info->pwszContainerName));
|
||||
+ ok(!lstrcmpW(info->pwszProvName, providerW), "got %s\n", wine_dbgstr_w(info->pwszProvName));
|
||||
+ ok(info->dwProvType == 0x12345678, "got %#x\n", info->dwProvType);
|
||||
+ ok(info->dwFlags == 0x87654321, "got %#x\n", info->dwFlags);
|
||||
+ ok(info->dwKeySpec == 0x11223344, "got %#x\n", info->dwKeySpec);
|
||||
+ ok(info->cProvParam == 2, "got %#x\n", info->cProvParam);
|
||||
+ ok(info->rgProvParam != NULL, "got %p\n", info->rgProvParam);
|
||||
+ ok(info->rgProvParam[0].dwParam == param[0].dwParam, "got %#x\n", info->rgProvParam[0].dwParam);
|
||||
+ ok(info->rgProvParam[0].cbData == param[0].cbData, "got %#x\n", info->rgProvParam[0].cbData);
|
||||
+ ok(!memcmp(info->rgProvParam[0].pbData, param[0].pbData, param[0].cbData), "param1 mismatch\n");
|
||||
+ ok(info->rgProvParam[0].dwFlags == param[0].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags);
|
||||
+ ok(info->rgProvParam[1].dwParam == param[1].dwParam, "got %#x\n", info->rgProvParam[1].dwParam);
|
||||
+ ok(info->rgProvParam[1].cbData == param[1].cbData, "got %#x\n", info->rgProvParam[1].cbData);
|
||||
+ ok(!memcmp(info->rgProvParam[1].pbData, param[1].pbData, param[1].cbData), "param2 mismatch\n");
|
||||
+ ok(info->rgProvParam[1].dwFlags == param[1].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags);
|
||||
+ HeapFree(GetProcessHeap(), 0, info);
|
||||
+
|
||||
+ ret = CertDeleteCertificateFromStore(cert);
|
||||
+ ok(ret, "CertDeleteCertificateFromStore error %#x\n", GetLastError());
|
||||
+
|
||||
+ CertFreeCertificateContext(cert);
|
||||
+ CertCloseStore(store, 0);
|
||||
+}
|
||||
+
|
||||
START_TEST(cert)
|
||||
{
|
||||
init_function_pointers();
|
||||
@@ -4154,6 +4249,7 @@ START_TEST(cert)
|
||||
testGetSubjectCert();
|
||||
testGetIssuerCert();
|
||||
testLinkCert();
|
||||
+ testKeyProvInfo();
|
||||
|
||||
testCryptHashCert();
|
||||
testCryptHashCert2();
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [50024] signtool.exe from Windows 7 SDK fails to find certificates
|
@ -1,131 +0,0 @@
|
||||
From 600fb937ace942db4325c268d71f799f7c058286 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 18 Nov 2020 13:48:23 -0600
|
||||
Subject: [PATCH] winegstreamer: Implement ::SetInputType for audio conversion
|
||||
transform.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/audioconvert.c | 77 ++++++++++++++++++++++++++++++-
|
||||
1 file changed, 75 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
|
||||
index 9499920347f..8bfd28b1ef2 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
+#include <gst/gst.h>
|
||||
|
||||
#include "gst_private.h"
|
||||
|
||||
@@ -36,6 +37,8 @@ struct audio_converter
|
||||
{
|
||||
IMFTransform IMFTransform_iface;
|
||||
LONG refcount;
|
||||
+ IMFMediaType *input_type;
|
||||
+ CRITICAL_SECTION cs;
|
||||
};
|
||||
|
||||
static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface)
|
||||
@@ -79,6 +82,8 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
+ transform->cs.DebugInfo->Spare[0] = 0;
|
||||
+ DeleteCriticalSection(&transform->cs);
|
||||
heap_free(transform);
|
||||
}
|
||||
|
||||
@@ -270,9 +275,74 @@ fail:
|
||||
|
||||
static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
|
||||
{
|
||||
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
|
||||
+ GstCaps *input_caps;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
|
||||
+
|
||||
+ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
|
||||
+
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ if (type)
|
||||
+ {
|
||||
+ GUID major_type, subtype;
|
||||
+ DWORD unused;
|
||||
+
|
||||
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ if (!(input_caps = caps_from_mf_media_type(type)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ gst_caps_unref(input_caps);
|
||||
+ }
|
||||
+
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ return S_OK;
|
||||
+
|
||||
+ EnterCriticalSection(&converter->cs);
|
||||
+
|
||||
+ hr = S_OK;
|
||||
+
|
||||
+ if (type)
|
||||
+ {
|
||||
+ if (!converter->input_type)
|
||||
+ hr = MFCreateMediaType(&converter->input_type);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IMFMediaType_Release(converter->input_type);
|
||||
+ converter->input_type = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (converter->input_type)
|
||||
+ {
|
||||
+ IMFMediaType_Release(converter->input_type);
|
||||
+ converter->input_type = NULL;
|
||||
+ }
|
||||
+
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
|
||||
@@ -395,6 +465,9 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
|
||||
object->IMFTransform_iface.lpVtbl = &audio_converter_vtbl;
|
||||
object->refcount = 1;
|
||||
|
||||
+ InitializeCriticalSection(&object->cs);
|
||||
+ object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock");
|
||||
+
|
||||
*ret = &object->IMFTransform_iface;
|
||||
return S_OK;
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,106 +0,0 @@
|
||||
From 661099668f972a9bb0a9194c2691ab034e1ebe9e Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 2 Dec 2020 14:36:17 -0500
|
||||
Subject: [PATCH] winegstreamer: Implement ::SetOutputType for audio conversion
|
||||
transform.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/audioconvert.c | 73 ++++++++++++++++++++++++++++++-
|
||||
1 file changed, 71 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
|
||||
index 8bfd28b1ef2..7fb0dee99f6 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -38,6 +38,7 @@ struct audio_converter
|
||||
IMFTransform IMFTransform_iface;
|
||||
LONG refcount;
|
||||
IMFMediaType *input_type;
|
||||
+ IMFMediaType *output_type;
|
||||
CRITICAL_SECTION cs;
|
||||
};
|
||||
|
||||
@@ -347,9 +348,77 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
|
||||
|
||||
static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
|
||||
{
|
||||
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
|
||||
+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
|
||||
+ GUID major_type, subtype;
|
||||
+ GstCaps *output_caps;
|
||||
+ DWORD unused;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
|
||||
+
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ if (!converter->input_type)
|
||||
+ return MF_E_TRANSFORM_TYPE_NOT_SET;
|
||||
+
|
||||
+ if (type)
|
||||
+ {
|
||||
+ /* validate the type */
|
||||
+
|
||||
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ if (!(output_caps = caps_from_mf_media_type(type)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ gst_caps_unref(output_caps);
|
||||
+ }
|
||||
+
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ return S_OK;
|
||||
+
|
||||
+ EnterCriticalSection(&converter->cs);
|
||||
+
|
||||
+ hr = S_OK;
|
||||
+
|
||||
+ if (type)
|
||||
+ {
|
||||
+ if (!converter->output_type)
|
||||
+ hr = MFCreateMediaType(&converter->output_type);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IMFMediaType_Release(converter->output_type);
|
||||
+ converter->output_type = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (converter->output_type)
|
||||
+ {
|
||||
+ IMFMediaType_Release(converter->output_type);
|
||||
+ converter->output_type = NULL;
|
||||
+ }
|
||||
+
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,87 +0,0 @@
|
||||
From 617386fb620e7751e926046f5cf785ebde436aa4 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 24 Nov 2020 15:25:48 -0500
|
||||
Subject: [PATCH] winegstreamer: Implement Get(Input/Output)CurrentType
|
||||
functions for audio converter transform.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/audioconvert.c | 56 ++++++++++++++++++++++++++++---
|
||||
1 file changed, 52 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
|
||||
index 556aba44fc9..e709c43ed5c 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -473,16 +473,64 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
|
||||
|
||||
static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
||||
{
|
||||
- FIXME("%p, %u, %p.\n", iface, id, type);
|
||||
+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
|
||||
+ IMFMediaType *ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("%p, %u, %p.\n", converter, id, type);
|
||||
+
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ if (FAILED(hr = MFCreateMediaType(&ret)))
|
||||
+ return hr;
|
||||
+
|
||||
+ EnterCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (converter->input_type)
|
||||
+ hr = IMFMediaType_CopyAllItems(converter->input_type, (IMFAttributes *)ret);
|
||||
+ else
|
||||
+ hr = MF_E_TRANSFORM_TYPE_NOT_SET;
|
||||
+
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ *type = ret;
|
||||
+ else
|
||||
+ IMFMediaType_Release(ret);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI audio_converter_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
||||
{
|
||||
- FIXME("%p, %u, %p.\n", iface, id, type);
|
||||
+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
|
||||
+ IMFMediaType *ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("%p, %u, %p.\n", converter, id, type);
|
||||
+
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ if (FAILED(hr = MFCreateMediaType(&ret)))
|
||||
+ return hr;
|
||||
+
|
||||
+ EnterCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (converter->output_type)
|
||||
+ hr = IMFMediaType_CopyAllItems(converter->output_type, (IMFAttributes *)ret);
|
||||
+ else
|
||||
+ hr = MF_E_TRANSFORM_TYPE_NOT_SET;
|
||||
+
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ *type = ret;
|
||||
+ else
|
||||
+ IMFMediaType_Release(ret);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI audio_converter_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,4 +1,4 @@
|
||||
From da42137e7187fddc47862f435f3f238c687dc109 Mon Sep 17 00:00:00 2001
|
||||
From 869b1db8e2cc5e35976eaa751a3aa10dd017702d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 3 Apr 2017 05:30:27 +0200
|
||||
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
|
||||
@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
|
||||
3 files changed, 141 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index ca6afcbe051..2b6f51d55ba 100644
|
||||
index 67fd62ef6aa..d101104af1d 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -30,6 +30,7 @@
|
||||
@ -21,7 +21,7 @@ index ca6afcbe051..2b6f51d55ba 100644
|
||||
#include "wine/test.h"
|
||||
#include "delayloadhandler.h"
|
||||
|
||||
@@ -3945,6 +3946,79 @@ static void test_LoadPackagedLibrary(void)
|
||||
@@ -3992,6 +3993,79 @@ static void test_LoadPackagedLibrary(void)
|
||||
h, GetLastError());
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ index ca6afcbe051..2b6f51d55ba 100644
|
||||
START_TEST(loader)
|
||||
{
|
||||
int argc;
|
||||
@@ -4017,6 +4091,7 @@ START_TEST(loader)
|
||||
@@ -4064,6 +4138,7 @@ START_TEST(loader)
|
||||
test_InMemoryOrderModuleList();
|
||||
test_LoadPackagedLibrary();
|
||||
test_wow64_redirection();
|
||||
@ -110,10 +110,10 @@ index ca6afcbe051..2b6f51d55ba 100644
|
||||
test_dll_file( "kernel32.dll" );
|
||||
test_dll_file( "advapi32.dll" );
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 55588774b29..06f4571a008 100644
|
||||
index d948913d7b8..d2663916149 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -124,6 +124,9 @@ struct file_id
|
||||
@@ -115,6 +115,9 @@ struct file_id
|
||||
BYTE ObjectId[16];
|
||||
};
|
||||
|
||||
@ -123,7 +123,7 @@ index 55588774b29..06f4571a008 100644
|
||||
/* internal representation of loaded modules */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
@@ -484,6 +487,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
@@ -455,6 +458,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ index 55588774b29..06f4571a008 100644
|
||||
/*************************************************************************
|
||||
* get_modref
|
||||
*
|
||||
@@ -1225,7 +1274,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
@@ -1197,7 +1246,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
&wm->ldr.InLoadOrderLinks);
|
||||
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
|
||||
&wm->ldr.InMemoryOrderLinks);
|
||||
@ -189,7 +189,7 @@ index 55588774b29..06f4571a008 100644
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
@@ -1956,6 +2010,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
@@ -1904,6 +1958,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
/* the module has only be inserted in the load & memory order lists */
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@ -197,7 +197,7 @@ index 55588774b29..06f4571a008 100644
|
||||
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
@@ -3330,6 +3385,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
@@ -3269,6 +3324,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
{
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@ -205,7 +205,7 @@ index 55588774b29..06f4571a008 100644
|
||||
if (wm->ldr.InInitializationOrderLinks.Flink)
|
||||
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
|
||||
|
||||
@@ -4091,6 +4147,7 @@ static NTSTATUS process_init(void)
|
||||
@@ -3988,6 +4044,7 @@ static NTSTATUS process_init(void)
|
||||
INITIAL_TEB stack;
|
||||
TEB *teb = NtCurrentTeb();
|
||||
PEB *peb = teb->Peb;
|
||||
@ -213,7 +213,7 @@ index 55588774b29..06f4571a008 100644
|
||||
|
||||
peb->LdrData = &ldr;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
@@ -4130,6 +4187,10 @@ static NTSTATUS process_init(void)
|
||||
@@ -4024,6 +4081,10 @@ static NTSTATUS process_init(void)
|
||||
load_global_options();
|
||||
version_init();
|
||||
|
||||
@ -222,9 +222,9 @@ index 55588774b29..06f4571a008 100644
|
||||
+ InitializeListHead(&hash_table[i]);
|
||||
+
|
||||
/* setup the load callback and create ntdll modref */
|
||||
RtlInitUnicodeString( &nt_name, ntdllW );
|
||||
RtlInitUnicodeString( &nt_name, L"\\??\\C:\\windows\\system32\\ntdll.dll" );
|
||||
NtQueryVirtualMemory( GetCurrentProcess(), process_init, MemoryBasicInformation,
|
||||
@@ -4223,6 +4284,10 @@ static NTSTATUS process_init(void)
|
||||
@@ -4118,6 +4179,10 @@ static NTSTATUS process_init(void)
|
||||
teb->Tib.StackBase = stack.StackBase;
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
@ -236,10 +236,10 @@ index 55588774b29..06f4571a008 100644
|
||||
}
|
||||
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 62395bbce38..2511fa37c05 100644
|
||||
index c5f3ba04a8a..d5d16eff4f5 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2680,8 +2680,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
@@ -2721,8 +2721,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
ULONG Flags;
|
||||
SHORT LoadCount;
|
||||
SHORT TlsIndex;
|
||||
@ -250,5 +250,5 @@ index 62395bbce38..2511fa37c05 100644
|
||||
HANDLE ActivationContext;
|
||||
void* Lock;
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7bbbf2acdaa6229c58b42001fa01465e2e0cdbb5 Mon Sep 17 00:00:00 2001
|
||||
From 9970a7ac4c75019023d35ab7fadcfa8e5d6af32f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 30 May 2015 02:23:15 +0200
|
||||
Subject: [PATCH] ntdll: Add support for hiding wine version information from
|
||||
@ -10,12 +10,12 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from
|
||||
2 files changed, 103 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index bff0bda1bed..fc8c815fb39 100644
|
||||
index 1110fa37b6d..f0a9748b5fa 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -82,6 +82,9 @@ static const WCHAR system_path[] =
|
||||
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
@@ -75,6 +75,9 @@ BOOL is_wow64 = FALSE;
|
||||
/* system search path */
|
||||
static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows";
|
||||
|
||||
+#define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
|
||||
+
|
||||
@ -23,7 +23,7 @@ index bff0bda1bed..fc8c815fb39 100644
|
||||
static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */
|
||||
static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */
|
||||
static int free_lib_count; /* recursion depth of LdrUnloadDll calls */
|
||||
@@ -98,6 +101,8 @@ struct dll_dir_entry
|
||||
@@ -91,6 +94,8 @@ struct dll_dir_entry
|
||||
|
||||
static struct list dll_dir_list = LIST_INIT( dll_dir_list ); /* extra dirs from LdrAddDllDirectory */
|
||||
|
||||
@ -32,7 +32,7 @@ index bff0bda1bed..fc8c815fb39 100644
|
||||
struct ldr_notification
|
||||
{
|
||||
struct list entry;
|
||||
@@ -1809,6 +1814,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
|
||||
@@ -1757,6 +1762,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
|
||||
}
|
||||
|
||||
|
||||
@ -129,7 +129,7 @@ index bff0bda1bed..fc8c815fb39 100644
|
||||
/******************************************************************
|
||||
* LdrGetProcedureAddress (NTDLL.@)
|
||||
*/
|
||||
@@ -1829,7 +1924,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
|
||||
@@ -1777,7 +1872,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
|
||||
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
|
||||
void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, load_path )
|
||||
: find_ordinal_export( module, exports, exp_size, ord - exports->Base, load_path );
|
||||
@ -138,7 +138,7 @@ index bff0bda1bed..fc8c815fb39 100644
|
||||
{
|
||||
*address = proc;
|
||||
ret = STATUS_SUCCESS;
|
||||
@@ -4261,6 +4356,8 @@ static NTSTATUS process_init(void)
|
||||
@@ -4156,6 +4251,8 @@ static NTSTATUS process_init(void)
|
||||
NtTerminateProcess( GetCurrentProcess(), status );
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ index bff0bda1bed..fc8c815fb39 100644
|
||||
if (NtCurrentTeb64())
|
||||
{
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 1f7226a3ac8..56d26bfe005 100644
|
||||
index 3bd70b60874..98629129c44 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -155,6 +155,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB
|
||||
@ -164,5 +164,5 @@ index 1f7226a3ac8..56d26bfe005 100644
|
||||
static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
|
||||
{
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "727168a9e116a43f851df2673a9169ad280a9ec8"
|
||||
echo "842b38e29166a429d59331be40761335807c85d2"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -95,7 +95,6 @@ patch_enable_all ()
|
||||
enable_comctl32_version_6="$1"
|
||||
enable_comdlg32_lpstrFileTitle="$1"
|
||||
enable_crypt32_CMS_Certificates="$1"
|
||||
enable_crypt32_CRYPT_KEY_PROV_INFO="$1"
|
||||
enable_cryptext_CryptExtOpenCER="$1"
|
||||
enable_d3d11_Deferred_Context="$1"
|
||||
enable_d3dx9_32bpp_Alpha_Channel="$1"
|
||||
@ -367,9 +366,6 @@ patch_enable ()
|
||||
crypt32-CMS_Certificates)
|
||||
enable_crypt32_CMS_Certificates="$2"
|
||||
;;
|
||||
crypt32-CRYPT_KEY_PROV_INFO)
|
||||
enable_crypt32_CRYPT_KEY_PROV_INFO="$2"
|
||||
;;
|
||||
cryptext-CryptExtOpenCER)
|
||||
enable_cryptext_CryptExtOpenCER="$2"
|
||||
;;
|
||||
@ -1836,18 +1832,6 @@ if test "$enable_crypt32_CMS_Certificates" -eq 1; then
|
||||
patch_apply crypt32-CMS_Certificates/0001-crypt32-Skip-unknown-item-when-decoding-a-CMS-certif.patch
|
||||
fi
|
||||
|
||||
# Patchset crypt32-CRYPT_KEY_PROV_INFO
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#50024] signtool.exe from Windows 7 SDK fails to find certificates
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/crypt32/cert.c, dlls/crypt32/crypt32_private.h, dlls/crypt32/serialize.c, dlls/crypt32/tests/cert.c
|
||||
# |
|
||||
if test "$enable_crypt32_CRYPT_KEY_PROV_INFO" -eq 1; then
|
||||
patch_apply crypt32-CRYPT_KEY_PROV_INFO/0001-crypt32-Fix-reading-and-writing-CRYPT_KEY_PROV_INFO-.patch
|
||||
fi
|
||||
|
||||
# Patchset cryptext-CryptExtOpenCER
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -2771,12 +2755,9 @@ fi
|
||||
# | include/mfidl.idl, tools/make_makefiles, tools/makedep.c
|
||||
# |
|
||||
if test "$enable_mfplat_streaming_support" -eq 1; then
|
||||
patch_apply mfplat-streaming-support/0001-winegstreamer-Implement-SetInputType-for-audio-conve.patch
|
||||
patch_apply mfplat-streaming-support/0002-winegstreamer-Implement-SetOutputType-for-audio-conv.patch
|
||||
patch_apply mfplat-streaming-support/0003-winegstreamer-Implement-Process-Input-Output-for-aud.patch
|
||||
patch_apply mfplat-streaming-support/0004-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch
|
||||
patch_apply mfplat-streaming-support/0005-winegstreamer-Implement-Get-Attributes-functions-for.patch
|
||||
patch_apply mfplat-streaming-support/0006-winegstreamer-Implement-Get-Input-Output-CurrentType.patch
|
||||
patch_apply mfplat-streaming-support/0007-winegstreamer-Introduce-color-conversion-transform.patch
|
||||
patch_apply mfplat-streaming-support/0008-winegstreamer-Register-the-color-conversion-transfor.patch
|
||||
patch_apply mfplat-streaming-support/0009-winegstreamer-Implement-GetInputAvailableType-for-co.patch
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 85c9586902b2f1d197e0d6dcbde53a36b7803092 Mon Sep 17 00:00:00 2001
|
||||
From cacb65b29f688766745372653bd406116e87ee87 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 8 Aug 2018 20:00:15 -0500
|
||||
Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition.
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition.
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 0eac7fdb939..36c1a467562 100644
|
||||
index 4ededa838b4..b0c4853ca48 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -4181,6 +4181,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
||||
@@ -4109,6 +4109,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -20,16 +20,16 @@ index 0eac7fdb939..36c1a467562 100644
|
||||
|
||||
/***********************************************************************
|
||||
* restart_winevdm
|
||||
@@ -4217,7 +4218,7 @@ static NTSTATUS process_init(void)
|
||||
's','y','s','t','e','m','3','2','\\',
|
||||
'k','e','r','n','e','l','3','2','.','d','l','l',0};
|
||||
@@ -4139,7 +4140,7 @@ static void restart_winevdm( RTL_USER_PROCESS_PARAMETERS *params )
|
||||
static NTSTATUS process_init(void)
|
||||
{
|
||||
RTL_USER_PROCESS_PARAMETERS *params;
|
||||
- WINE_MODREF *wm;
|
||||
+ WINE_MODREF *wm, *wow64cpu_wm;
|
||||
NTSTATUS status;
|
||||
ANSI_STRING func_name;
|
||||
UNICODE_STRING nt_name;
|
||||
@@ -4282,6 +4283,13 @@ static NTSTATUS process_init(void)
|
||||
@@ -4201,6 +4202,13 @@ static NTSTATUS process_init(void)
|
||||
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
|
||||
NtTerminateProcess( GetCurrentProcess(), status );
|
||||
}
|
||||
@ -44,10 +44,10 @@ index 0eac7fdb939..36c1a467562 100644
|
||||
if ((status = LdrGetProcedureAddress( wm->ldr.DllBase, &func_name,
|
||||
0, (void **)&pBaseThreadInitThunk )) != STATUS_SUCCESS)
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index c0e9c681e1d..e343e66f4af 100644
|
||||
index aa34fdf04d9..34cdeaa1479 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1124,6 +1124,7 @@
|
||||
@@ -1130,6 +1130,7 @@
|
||||
@ stdcall WinSqmIsOptedIn()
|
||||
@ stdcall WinSqmSetDWORD(ptr long long)
|
||||
@ stdcall WinSqmStartSession(ptr long long)
|
||||
@ -56,5 +56,5 @@ index c0e9c681e1d..e343e66f4af 100644
|
||||
@ stdcall -private -syscall ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck
|
||||
@ stdcall -private -syscall ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
@ -1 +1 @@
|
||||
727168a9e116a43f851df2673a9169ad280a9ec8
|
||||
842b38e29166a429d59331be40761335807c85d2
|
||||
|
Loading…
x
Reference in New Issue
Block a user