Module: wine
Branch: master
Commit: b78c69dd4b4ef4c0f9203f7970148ab6e1393258
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b78c69dd4b4ef4c0f9203f797…
Author: Juan Lang <juan.lang(a)gmail.com>
Date: Wed Oct 3 12:01:57 2007 -0700
wintrust: Remove bad check that prevents root certificates from appearing time valid.
---
dlls/wintrust/softpub.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c
index b467464..bef0775 100644
--- a/dlls/wintrust/softpub.c
+++ b/dlls/wintrust/softpub.c
@@ -526,11 +526,7 @@ BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner,
{
/* Set confidence */
data->pasSigners[idxSigner].pasCertChain[i].dwConfidence = 0;
- /* The last element in the chain doesn't have an issuer, so it
- * can't have a valid time (with respect to its issuer)
- */
- if (i != simpleChain->cElement - 1 &&
- !(simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus &
+ if (!(simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus &
CERT_TRUST_IS_NOT_TIME_VALID))
data->pasSigners[idxSigner].pasCertChain[i].dwConfidence
|= CERT_CONFIDENCE_TIME;
Module: wine
Branch: master
Commit: 85efd02fab2440686a812a7c6d58f339259113ec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=85efd02fab2440686a812a7c6…
Author: Juan Lang <juan.lang(a)gmail.com>
Date: Wed Oct 3 11:54:18 2007 -0700
wintrust: Copy time to verify from cert info.
---
dlls/wintrust/softpub.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c
index 5a2aab5..f1aae3b 100644
--- a/dlls/wintrust/softpub.c
+++ b/dlls/wintrust/softpub.c
@@ -276,7 +276,19 @@ HRESULT WINAPI SoftpubLoadMessage(CRYPT_PROVIDER_DATA *data)
CRYPT_PROVIDER_SGNR signer = { sizeof(signer), { 0 } };
DWORD i;
- /* Add empty signer, so we can add a cert to it */
+ /* Add a signer with nothing but the time to verify, so we can
+ * add a cert to it
+ */
+ if (data->pWintrustData->u.pCert->psftVerifyAsOf)
+ memcpy(&data->sftSystemTime, &signer.sftVerifyAsOf,
+ sizeof(FILETIME));
+ else
+ {
+ SYSTEMTIME sysTime;
+
+ GetSystemTime(&sysTime);
+ SystemTimeToFileTime(&sysTime, &signer.sftVerifyAsOf);
+ }
ret = data->psPfns->pfnAddSgnr2Chain(data, FALSE, 0, &signer);
if (!ret)
goto error;