Rebase against f0ad5b5c546d17b281aef13fde996cda08d0c14e.

This commit is contained in:
Zebediah Figura 2018-08-23 17:35:08 -05:00
parent 8ff32873d6
commit 74e9c4f8ce
5 changed files with 29 additions and 92 deletions

View File

@ -1,43 +0,0 @@
From bba53bba66f4ca7b8726424e8215854a657c024a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 15 Nov 2016 23:50:23 +0100
Subject: crypt32: Properly check root certificate in
CERT_CHAIN_REVOCATION_CHECK_CHAIN.
CA certificates do not have a parent which defines a CRL, but Windows seems to require
that CA certificates are self signed. We therefore should set pIssuerCert to the
CA certificate itself before calling CertVerifyRevocation. On windows the function
does not seem to fail if no CRL could be found, so ignore this error for now.
---
dlls/crypt32/chain.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index aab2e91..80b6513 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -2704,10 +2704,20 @@ static void CRYPT_VerifyChainRevocation(PCERT_CHAIN_CONTEXT chain,
revocationPara.pIssuerCert =
chain->rgpChain[i]->rgpElement[j + 1]->pCertContext;
else
- revocationPara.pIssuerCert = NULL;
+ revocationPara.pIssuerCert = certToCheck;
+
ret = CertVerifyRevocation(X509_ASN_ENCODING,
CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certToCheck,
revocationFlags, &revocationPara, &revocationStatus);
+
+ if (!ret && revocationStatus.dwError == CRYPT_E_NO_REVOCATION_CHECK &&
+ revocationPara.pIssuerCert == certToCheck)
+ {
+ FIXME("Unable to find CRL for CA certificate\n");
+ ret = TRUE;
+ revocationStatus.dwError = 0;
+ }
+
if (!ret)
{
PCERT_CHAIN_ELEMENT element = CRYPT_FindIthElementInChain(
--
2.9.0

View File

@ -1 +0,0 @@
Fixes: [41652] Fix root certificate check in CERT_CHAIN_REVOCATION_CHECK_CHAIN

View File

@ -1,4 +1,4 @@
From a1989f6e804cd11efe4da438939b481ef430cd4c Mon Sep 17 00:00:00 2001
From 5c702d06817514162fa7bbc09bbc135db6319d7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 30 Sep 2017 03:08:58 +0200
Subject: crypt32/tets: Add test for verifying an ecdsa chain.
@ -8,7 +8,7 @@ Subject: crypt32/tets: Add test for verifying an ecdsa chain.
1 file changed, 84 insertions(+)
diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 0839fc73976..1279735e496 100644
index e2a7633..2b69fd5 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -2889,6 +2889,59 @@ static const BYTE chain31_1[] = {
@ -106,8 +106,8 @@ index 0839fc73976..1279735e496 100644
#define test_name_blob(a,b) _test_name_blob(__LINE__,a,b)
static void _test_name_blob(unsigned line, CERT_NAME_BLOB *blob, const char *exdata)
@@ -4148,6 +4222,16 @@ static void testGetCertChain(void)
@@ -4167,6 +4241,16 @@ static void testGetCertChain(void)
ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
pCertFreeCertificateChain(chain);
+ /* Test with ECDSA certificate */
@ -124,5 +124,5 @@ index 0839fc73976..1279735e496 100644
ret = CertGetCertificateChain(HCCE_LOCAL_MACHINE, cert, &fileTime, store, &para, 0, NULL, &chain);
ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
--
2.14.1
2.7.4

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "18564c76fc613f61a3e13b7497dde4b29b35194e"
echo "f0ad5b5c546d17b281aef13fde996cda08d0c14e"
}
# Show version information
@ -102,7 +102,6 @@ patch_enable_all ()
enable_comdlg32_lpstrFileTitle="$1"
enable_configure_Absolute_RPATH="$1"
enable_crypt32_CMS_Certificates="$1"
enable_crypt32_Certificate_Check="$1"
enable_crypt32_CryptUnprotectMemory="$1"
enable_crypt32_ECDSA_Cert_Chains="$1"
enable_crypt32_MS_Root_Certs="$1"
@ -482,9 +481,6 @@ patch_enable ()
crypt32-CMS_Certificates)
enable_crypt32_CMS_Certificates="$2"
;;
crypt32-Certificate_Check)
enable_crypt32_Certificate_Check="$2"
;;
crypt32-CryptUnprotectMemory)
enable_crypt32_CryptUnprotectMemory="$2"
;;
@ -2797,21 +2793,6 @@ if test "$enable_crypt32_CMS_Certificates" -eq 1; then
) >> "$patchlist"
fi
# Patchset crypt32-Certificate_Check
# |
# | This patchset fixes the following Wine bugs:
# | * [#41652] Fix root certificate check in CERT_CHAIN_REVOCATION_CHECK_CHAIN
# |
# | Modified files:
# | * dlls/crypt32/chain.c
# |
if test "$enable_crypt32_Certificate_Check" -eq 1; then
patch_apply crypt32-Certificate_Check/0001-crypt32-Properly-check-root-certificate-in-CERT_CHAI.patch
(
printf '%s\n' '+ { "Michael Müller", "crypt32: Properly check root certificate in CERT_CHAIN_REVOCATION_CHECK_CHAIN.", 1 },';
) >> "$patchlist"
fi
# Patchset crypt32-CryptUnprotectMemory
# |
# | Modified files:

View File

@ -1,4 +1,4 @@
From 1476a4a901c437d13b7dc7d318ae76e2177a0b59 Mon Sep 17 00:00:00 2001
From dcb185effe74be9c6899a503e62e8308c973f44d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 20 Jul 2017 13:50:07 +0200
Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
@ -17,10 +17,10 @@ Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
10 files changed, 73 insertions(+), 71 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 9854906..685c86e 100644
index f0ff7b3..cd2f1bb 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -689,6 +689,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -702,6 +702,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
static const float default_blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f};
struct d3d_blend_state *blend_state_impl;
const D3D11_BLEND_DESC *desc;
@ -28,7 +28,7 @@ index 9854906..685c86e 100644
TRACE("iface %p, blend_state %p, blend_factor %s, sample_mask 0x%08x.\n",
iface, blend_state, debug_float4(blend_factor), sample_mask);
@@ -703,14 +704,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -716,14 +717,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
{
wined3d_device_set_blend_state(device->wined3d_device, NULL);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ALPHABLENDENABLE, FALSE);
@ -48,7 +48,7 @@ index 9854906..685c86e 100644
wined3d_mutex_unlock();
return;
}
@@ -738,14 +736,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -751,14 +749,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
|| d->DestBlendAlpha == D3D11_BLEND_BLEND_FACTOR || d->DestBlendAlpha == D3D11_BLEND_INV_BLEND_FACTOR))
FIXME("Ignoring blend factor %s.\n", debug_float4(blend_factor));
}
@ -86,10 +86,10 @@ index d4c3bef..ed4ba5e 100644
/* glEnableIndexedEXT(GL_BLEND, ...) */
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 21ad11d..4d66dff 100644
index 9d2236b..96c9dfb 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2746,7 +2746,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
@@ -2768,7 +2768,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_texture *rt = context->current_rt.texture;
DWORD rt_mask, *cur_mask;
@ -98,7 +98,7 @@ index 21ad11d..4d66dff 100644
SIZE rt_size;
TRACE("Setting up context %p for blitting.\n", context);
@@ -2851,10 +2851,8 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
@@ -2873,10 +2873,8 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE));
}
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
@ -111,7 +111,7 @@ index 21ad11d..4d66dff 100644
context->last_was_rhw = TRUE;
context_invalidate_state(context, STATE_VDECL); /* because of last_was_rhw = TRUE */
@@ -4827,7 +4825,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
@@ -4849,7 +4847,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
if (!(rtv = fb->render_targets[i]) || rtv->format->id == WINED3DFMT_NULL)
continue;
@ -121,7 +121,7 @@ index 21ad11d..4d66dff 100644
wined3d_rendertarget_view_load_location(rtv, context, rtv->resource->draw_binding);
wined3d_rendertarget_view_invalidate_location(rtv, ~rtv->resource->draw_binding);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 9906f74..9ee4b27 100644
index ab67a96..6f1dd68 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -392,10 +392,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -236,7 +236,7 @@ index 2dd6ac2..d37e809 100644
{ STATE_RENDER(WINED3D_RS_BLENDFACTOR), { STATE_RENDER(WINED3D_RS_BLENDFACTOR), state_blendfactor_w }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_DEPTHBIAS), { STATE_RENDER(WINED3D_RS_DEPTHBIAS), state_depthbias }, WINED3D_GL_EXT_NONE },
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 093c740..397ddaa 100644
index baf1ec7..71f0ed6 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -45,6 +45,10 @@ static const DWORD pixel_states_render[] =
@ -250,15 +250,15 @@ index 093c740..397ddaa 100644
WINED3D_RS_DEPTHBIAS,
WINED3D_RS_DESTBLEND,
WINED3D_RS_DESTBLENDALPHA,
@@ -1225,7 +1229,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
tmpfloat.f = gl_info->limits.pointsize_max;
@@ -1226,7 +1230,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
tmpfloat.f = d3d_info->limits.pointsize_max;
state->render_states[WINED3D_RS_POINTSIZE_MAX] = tmpfloat.d;
state->render_states[WINED3D_RS_INDEXEDVERTEXBLENDENABLE] = FALSE;
- state->render_states[WINED3D_RS_COLORWRITEENABLE] = 0x0000000f;
tmpfloat.f = 0.0f;
state->render_states[WINED3D_RS_TWEENFACTOR] = tmpfloat.d;
state->render_states[WINED3D_RS_BLENDOP] = WINED3D_BLEND_OP_ADD;
@@ -1251,9 +1254,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
@@ -1252,9 +1255,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
state->render_states[WINED3D_RS_BACK_STENCILZFAIL] = WINED3D_STENCIL_OP_KEEP;
state->render_states[WINED3D_RS_BACK_STENCILPASS] = WINED3D_STENCIL_OP_KEEP;
state->render_states[WINED3D_RS_BACK_STENCILFUNC] = WINED3D_CMP_ALWAYS;
@ -268,7 +268,7 @@ index 093c740..397ddaa 100644
state->render_states[WINED3D_RS_BLENDFACTOR] = 0xffffffff;
state->render_states[WINED3D_RS_SRGBWRITEENABLE] = 0;
state->render_states[WINED3D_RS_DEPTHBIAS] = 0;
@@ -1271,6 +1271,8 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
@@ -1272,6 +1272,8 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
state->render_states[WINED3D_RS_SRCBLENDALPHA] = WINED3D_BLEND_ONE;
state->render_states[WINED3D_RS_DESTBLENDALPHA] = WINED3D_BLEND_ZERO;
state->render_states[WINED3D_RS_BLENDOPALPHA] = WINED3D_BLEND_OP_ADD;
@ -278,7 +278,7 @@ index 093c740..397ddaa 100644
/* Texture Stage States - Put directly into state block, we will call function below */
for (i = 0; i < MAX_TEXTURES; ++i)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5217033..9de0157 100644
index a297d55..a9f7637 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -160,6 +160,7 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
@ -303,10 +303,10 @@ index 5217033..9de0157 100644
gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 0152879..7a69bbd 100644
index a90456e..a783a84 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4399,7 +4399,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4627,7 +4627,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_DEBUGMONITORTOKEN);
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE_MAX);
D3DSTATE_TO_STR(WINED3D_RS_INDEXEDVERTEXBLENDENABLE);
@ -314,7 +314,7 @@ index 0152879..7a69bbd 100644
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
@@ -4419,9 +4418,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4647,9 +4646,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILZFAIL);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILPASS);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILFUNC);
@ -330,10 +330,10 @@ index 0152879..7a69bbd 100644
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f2c4cd6..d72d53a 100644
index de0b486..dd2908d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -275,6 +275,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
@@ -274,6 +274,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
#define MAX_UNORDERED_ACCESS_VIEWS 8
#define MAX_TGSM_REGISTERS 8192
#define MAX_VERTEX_BLENDS 4
@ -342,10 +342,10 @@ index f2c4cd6..d72d53a 100644
struct min_lookup
{
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 4a5d0dd..c629c12 100644
index 884e824..0203816 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -387,8 +387,20 @@ enum wined3d_render_state
@@ -400,8 +400,20 @@ enum wined3d_render_state
WINED3D_RS_DESTBLENDALPHA = 208,
WINED3D_RS_BLENDOPALPHA = 209,
WINED3D_RS_DEPTHBIASCLAMP = 210,