winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
467 discussions
Start a n
N
ew thread
Rémi Bernon : dinput: Remove outdated and superfluous comments.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: 1b3fab9bd4995c40b471748d006611d6eee4fc47 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1b3fab9bd4995c40b471748d006611…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Jan 21 21:42:10 2023 +0100 dinput: Remove outdated and superfluous comments. --- dlls/dinput/device.c | 42 ------------------------------------------ dlls/dinput/device_private.h | 3 --- dlls/dinput/dinput_main.c | 39 --------------------------------------- dlls/dinput/dinput_private.h | 1 - dlls/dinput/mouse.c | 6 ++---- 5 files changed, 2 insertions(+), 89 deletions(-)
1
0
0
0
Rémi Bernon : oledb32/tests: Avoid use-after-free and unused assignment.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: e091a7b8178cf515864b82ae8239f4e977f39179 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e091a7b8178cf515864b82ae8239f4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Jan 25 02:10:29 2023 +0100 oledb32/tests: Avoid use-after-free and unused assignment. --- dlls/oledb32/tests/database.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c index 5d99aef7a89..26e3ebf2186 100644 --- a/dlls/oledb32/tests/database.c +++ b/dlls/oledb32/tests/database.c @@ -1043,13 +1043,9 @@ static void test_odbc_provider(void) ok(propidlist.cPropertyIDs == 14, "got %ld\n", propinfoset->cPropertyInfos); for (i = 0; i < propidlist.cPropertyIDs; i++) - { ok(properties[i] == propidlist.rgPropertyIDs[i], "%ld, got %ld\n", i, propidlist.rgPropertyIDs[i]); - propidlist.rgPropertyIDs[i] = propinfoset->rgPropertyInfos[i].dwPropertyID; - } - CoTaskMemFree(propidlist.rgPropertyIDs); CoTaskMemFree(propset); }
1
0
0
0
Rémi Bernon : oledb32: Fix error info cleanup dispparams rgvarg index.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: e7fbdd1eb2f7e60e3ce3829c8468e39fdcb2ac3a URL:
https://gitlab.winehq.org/wine/wine/-/commit/e7fbdd1eb2f7e60e3ce3829c8468e3…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Jan 25 01:02:15 2023 +0100 oledb32: Fix error info cleanup dispparams rgvarg index. --- dlls/oledb32/errorinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/oledb32/errorinfo.c b/dlls/oledb32/errorinfo.c index b6e0d10e8e0..6857caeb368 100644 --- a/dlls/oledb32/errorinfo.c +++ b/dlls/oledb32/errorinfo.c @@ -120,7 +120,7 @@ static ULONG WINAPI errorrecords_Release(IErrorInfo* iface) IUnknown_Release(This->records[i].custom_error); for (j = 0; j < dispparams->cArgs && dispparams->rgvarg; j++) - VariantClear(&dispparams->rgvarg[i]); + VariantClear(&dispparams->rgvarg[j]); CoTaskMemFree(dispparams->rgvarg); CoTaskMemFree(dispparams->rgdispidNamedArgs); }
1
0
0
0
Hans Leidekker : advapi32: Bump random buffer size.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: 369e0cfae6052937ef6b90e8c9fe916ea6765d9b URL:
https://gitlab.winehq.org/wine/wine/-/commit/369e0cfae6052937ef6b90e8c9fe91…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 25 15:20:43 2023 +0100 advapi32: Bump random buffer size. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54364
--- dlls/advapi32/crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index 66ad7db3ab2..73c9b1d219d 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -2390,7 +2390,7 @@ static CRITICAL_SECTION_DEBUG random_debug = }; static CRITICAL_SECTION random_cs = { &random_debug, -1, 0, 0, 0, 0 }; -#define MAX_CPUS 128 +#define MAX_CPUS 256 static char random_buf[sizeof(SYSTEM_INTERRUPT_INFORMATION) * MAX_CPUS]; static ULONG random_len; static ULONG random_pos;
1
0
0
0
Paul Gofman : cryptnet: Also hash issuer cert for cache id.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: 66b1a4f333e0687922062cb859bd73e5545608bd URL:
https://gitlab.winehq.org/wine/wine/-/commit/66b1a4f333e0687922062cb859bd73…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Jan 24 12:07:31 2023 -0600 cryptnet: Also hash issuer cert for cache id. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54353
--- dlls/cryptnet/cryptnet_main.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c index 7d1c01363c0..75fa4028d12 100644 --- a/dlls/cryptnet/cryptnet_main.c +++ b/dlls/cryptnet/cryptnet_main.c @@ -1539,7 +1539,8 @@ static const char revocation_cache_signature[] = "Wine cached revocation"; #define CACHED_CERT_HASH_SIZE 20 -static FILE *open_cached_revocation_file(const CERT_CONTEXT *cert, const WCHAR *mode, int sharing) +static FILE *open_cached_revocation_file(const CERT_CONTEXT *cert, const CERT_REVOCATION_PARA *params, + const WCHAR *mode, int sharing) { BYTE hash_data[CACHED_CERT_HASH_SIZE]; WCHAR path[MAX_PATH]; @@ -1567,6 +1568,16 @@ static FILE *open_cached_revocation_file(const CERT_CONTEXT *cert, const WCHAR * CryptAcquireContextW(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); CryptCreateHash(prov, CALG_SHA1, 0, 0, &hash); CryptHashData(hash, cert->pbCertEncoded, cert->cbCertEncoded, 0); + if (params && params->pIssuerCert) + { + CryptHashData(hash, (BYTE *)¶ms->pIssuerCert->cbCertEncoded, sizeof(params->pIssuerCert->cbCertEncoded), 0); + CryptHashData(hash, params->pIssuerCert->pbCertEncoded, params->pIssuerCert->cbCertEncoded, 0); + } + else + { + size = 0; + CryptHashData(hash, (BYTE *)&size, sizeof(size), 0); + } size = sizeof(hash_data); CryptGetHashParam(hash, HP_HASHVAL, hash_data, &size, 0); CryptDestroyHash(hash); @@ -1583,7 +1594,7 @@ static FILE *open_cached_revocation_file(const CERT_CONTEXT *cert, const WCHAR * return _wfsopen(path, mode, sharing); } -static BOOL find_cached_revocation_status(const CERT_CONTEXT *cert, +static BOOL find_cached_revocation_status(const CERT_CONTEXT *cert, const CERT_REVOCATION_PARA *params, const FILETIME *time, CERT_REVOCATION_STATUS *status) { char buffer[sizeof(revocation_cache_signature)]; @@ -1591,7 +1602,7 @@ static BOOL find_cached_revocation_status(const CERT_CONTEXT *cert, FILE *file; int len; - if (!(file = open_cached_revocation_file(cert, L"rb", _SH_DENYWR))) + if (!(file = open_cached_revocation_file(cert, params, L"rb", _SH_DENYWR))) return FALSE; if ((len = fread(buffer, 1, sizeof(buffer), file)) != sizeof(buffer) @@ -1634,12 +1645,12 @@ static BOOL find_cached_revocation_status(const CERT_CONTEXT *cert, return TRUE; } -static void cache_revocation_status(const CERT_CONTEXT *cert, +static void cache_revocation_status(const CERT_CONTEXT *cert, const CERT_REVOCATION_PARA *params, const FILETIME *time, const CERT_REVOCATION_STATUS *status) { FILE *file; - if (!(file = open_cached_revocation_file(cert, L"wb", _SH_DENYRW))) + if (!(file = open_cached_revocation_file(cert, params, L"wb", _SH_DENYRW))) return; fwrite(revocation_cache_signature, 1, sizeof(revocation_cache_signature), file); fwrite(time, sizeof(*time), 1, file); @@ -2165,10 +2176,13 @@ static DWORD verify_cert_revocation(const CERT_CONTEXT *cert, FILETIME *pTime, FILETIME next_update = {0}; PCERT_EXTENSION ext; - if (find_cached_revocation_status(cert, pTime, pRevStatus)) + if (find_cached_revocation_status(cert, pRevPara, pTime, pRevStatus)) { if (pRevStatus->dwError == ERROR_SUCCESS || pRevStatus->dwError == CRYPT_E_REVOKED) + { + TRACE("Returning cached status.\n"); return pRevStatus->dwError; + } } if ((ext = CertFindExtension(szOID_AUTHORITY_INFO_ACCESS, cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) @@ -2264,7 +2278,7 @@ done: memset(&rev_status, 0, sizeof(rev_status)); rev_status.cbSize = sizeof(rev_status); rev_status.dwError = error; - cache_revocation_status(cert, &next_update, &rev_status); + cache_revocation_status(cert, pRevPara, &next_update, &rev_status); } return error; }
1
0
0
0
Paul Gofman : cryptnet: Use cert data hash as cache id instead of serial number.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: f114ab57d268bfc7803bbba82e9877cc6178fd0d URL:
https://gitlab.winehq.org/wine/wine/-/commit/f114ab57d268bfc7803bbba82e9877…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Jan 24 11:54:23 2023 -0600 cryptnet: Use cert data hash as cache id instead of serial number. --- dlls/cryptnet/cryptnet_main.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c index 211b5c3cf8c..7d1c01363c0 100644 --- a/dlls/cryptnet/cryptnet_main.c +++ b/dlls/cryptnet/cryptnet_main.c @@ -1537,11 +1537,16 @@ BOOL WINAPI CryptRetrieveObjectByUrlW(LPCWSTR pszURL, LPCSTR pszObjectOid, static const char revocation_cache_signature[] = "Wine cached revocation"; -static FILE *open_cached_revocation_file(const CRYPT_INTEGER_BLOB *serial, const WCHAR *mode, int sharing) +#define CACHED_CERT_HASH_SIZE 20 + +static FILE *open_cached_revocation_file(const CERT_CONTEXT *cert, const WCHAR *mode, int sharing) { + BYTE hash_data[CACHED_CERT_HASH_SIZE]; WCHAR path[MAX_PATH]; WCHAR *appdata_path; - DWORD len, i; + DWORD len, i, size; + HCRYPTPROV prov; + HCRYPTHASH hash; HRESULT hr; if (FAILED(hr = SHGetKnownFolderPath(&FOLDERID_LocalAppDataLow, 0, NULL, &appdata_path))) @@ -1553,24 +1558,32 @@ static FILE *open_cached_revocation_file(const CRYPT_INTEGER_BLOB *serial, const len = swprintf(path, ARRAY_SIZE(path), L"%s\\Microsoft\\CryptnetUrlCache\\Content\\", appdata_path); CoTaskMemFree(appdata_path); - if (len + serial->cbData * 2 * sizeof(WCHAR) > ARRAY_SIZE(path) - 1) + if (len + CACHED_CERT_HASH_SIZE * 2 * sizeof(WCHAR) > ARRAY_SIZE(path) - 1) { - WARN("Serial length exceeds static buffer; not caching.\n"); + WARN("Hash length exceeds static buffer; not caching.\n"); return INVALID_HANDLE_VALUE; } + CryptAcquireContextW(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); + CryptCreateHash(prov, CALG_SHA1, 0, 0, &hash); + CryptHashData(hash, cert->pbCertEncoded, cert->cbCertEncoded, 0); + size = sizeof(hash_data); + CryptGetHashParam(hash, HP_HASHVAL, hash_data, &size, 0); + CryptDestroyHash(hash); + CryptReleaseContext(prov, 0); + SHCreateDirectoryExW(NULL, path, NULL); - for (i = 0; i < serial->cbData; ++i) + for (i = 0; i < CACHED_CERT_HASH_SIZE; ++i) { - swprintf(path + len, 3, L"%02x", serial->pbData[i]); + swprintf(path + len, 3, L"%02x", hash_data[i]); len += 2; } return _wfsopen(path, mode, sharing); } -static BOOL find_cached_revocation_status(const CRYPT_INTEGER_BLOB *serial, +static BOOL find_cached_revocation_status(const CERT_CONTEXT *cert, const FILETIME *time, CERT_REVOCATION_STATUS *status) { char buffer[sizeof(revocation_cache_signature)]; @@ -1578,7 +1591,7 @@ static BOOL find_cached_revocation_status(const CRYPT_INTEGER_BLOB *serial, FILE *file; int len; - if (!(file = open_cached_revocation_file(serial, L"rb", _SH_DENYWR))) + if (!(file = open_cached_revocation_file(cert, L"rb", _SH_DENYWR))) return FALSE; if ((len = fread(buffer, 1, sizeof(buffer), file)) != sizeof(buffer) @@ -1621,12 +1634,12 @@ static BOOL find_cached_revocation_status(const CRYPT_INTEGER_BLOB *serial, return TRUE; } -static void cache_revocation_status(const CRYPT_INTEGER_BLOB *serial, +static void cache_revocation_status(const CERT_CONTEXT *cert, const FILETIME *time, const CERT_REVOCATION_STATUS *status) { FILE *file; - if (!(file = open_cached_revocation_file(serial, L"wb", _SH_DENYRW))) + if (!(file = open_cached_revocation_file(cert, L"wb", _SH_DENYRW))) return; fwrite(revocation_cache_signature, 1, sizeof(revocation_cache_signature), file); fwrite(time, sizeof(*time), 1, file); @@ -2152,7 +2165,7 @@ static DWORD verify_cert_revocation(const CERT_CONTEXT *cert, FILETIME *pTime, FILETIME next_update = {0}; PCERT_EXTENSION ext; - if (find_cached_revocation_status(&cert->pCertInfo->SerialNumber, pTime, pRevStatus)) + if (find_cached_revocation_status(cert, pTime, pRevStatus)) { if (pRevStatus->dwError == ERROR_SUCCESS || pRevStatus->dwError == CRYPT_E_REVOKED) return pRevStatus->dwError; @@ -2251,7 +2264,7 @@ done: memset(&rev_status, 0, sizeof(rev_status)); rev_status.cbSize = sizeof(rev_status); rev_status.dwError = error; - cache_revocation_status(&cert->pCertInfo->SerialNumber, &next_update, &rev_status); + cache_revocation_status(cert, &next_update, &rev_status); } return error; }
1
0
0
0
Paul Gofman : cryptnet: Cache revocation status in verify_cert_revocation().
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: 6e782449ab72cc5d20877934c580a45e8df46a04 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6e782449ab72cc5d20877934c580a4…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Jan 24 11:51:08 2023 -0600 cryptnet: Cache revocation status in verify_cert_revocation(). --- dlls/cryptnet/cryptnet_main.c | 56 ++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c index 516bbad9ca4..211b5c3cf8c 100644 --- a/dlls/cryptnet/cryptnet_main.c +++ b/dlls/cryptnet/cryptnet_main.c @@ -1683,7 +1683,8 @@ static const CRL_CONTEXT *retrieve_crl_from_dist_points(const CRYPT_URL_ARRAY *a } static DWORD verify_cert_revocation_from_dist_points_ext(const CRYPT_DATA_BLOB *value, const CERT_CONTEXT *cert, - FILETIME *time, DWORD flags, const CERT_REVOCATION_PARA *params, CERT_REVOCATION_STATUS *status) + FILETIME *time, DWORD flags, const CERT_REVOCATION_PARA *params, CERT_REVOCATION_STATUS *status, + FILETIME *next_update) { DWORD url_array_size, error; CRYPT_URL_ARRAY *url_array; @@ -1719,7 +1720,7 @@ static DWORD verify_cert_revocation_from_dist_points_ext(const CRYPT_DATA_BLOB * error = verify_cert_revocation_with_crl_online(cert, crl, time, status); - cache_revocation_status(&cert->pCertInfo->SerialNumber, &crl->pCrlInfo->NextUpdate, status); + *next_update = crl->pCrlInfo->NextUpdate; CertFreeCRLContext(crl); CryptMemFree(url_array); @@ -1920,12 +1921,11 @@ static DWORD check_ocsp_response_info(const CERT_INFO *cert, const CERT_INFO *is } static DWORD verify_signed_ocsp_response_info(const CERT_INFO *cert, const CERT_INFO *issuer, - const CRYPT_OBJID_BLOB *blob) + const CRYPT_OBJID_BLOB *blob, FILETIME *next_update) { OCSP_BASIC_SIGNED_RESPONSE_INFO *info; DWORD size, error, status = CRYPT_E_REVOCATION_OFFLINE; CRYPT_ALGORITHM_IDENTIFIER *alg; - FILETIME next_update; CRYPT_BIT_BLOB *sig; HCRYPTPROV prov = 0; HCRYPTHASH hash = 0; @@ -1935,7 +1935,7 @@ static DWORD verify_signed_ocsp_response_info(const CERT_INFO *cert, const CERT_ if (!CryptDecodeObjectEx(X509_ASN_ENCODING, OCSP_BASIC_SIGNED_RESPONSE, blob->pbData, blob->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size)) return GetLastError(); - if ((error = check_ocsp_response_info(cert, issuer, &info->ToBeSigned, &status, &next_update))) goto done; + if ((error = check_ocsp_response_info(cert, issuer, &info->ToBeSigned, &status, next_update))) goto done; alg = &info->SignatureInfo.SignatureAlgorithm; if (!alg->pszObjId || !(algid = CertOIDToAlgId(alg->pszObjId))) @@ -1964,16 +1964,6 @@ static DWORD verify_signed_ocsp_response_info(const CERT_INFO *cert, const CERT_ else error = ERROR_SUCCESS; done: - if (next_update.dwLowDateTime || next_update.dwHighDateTime) - { - CERT_REVOCATION_STATUS rev_status; - - memset(&rev_status, 0, sizeof(rev_status)); - rev_status.cbSize = sizeof(rev_status); - rev_status.dwError = status; - cache_revocation_status(&cert->SerialNumber, &next_update, &rev_status); - } - CryptDestroyKey(key); CryptDestroyHash(hash); CryptReleaseContext(prov, 0); @@ -1983,7 +1973,7 @@ done: } static DWORD handle_ocsp_response(const CERT_INFO *cert, const CERT_INFO *issuer, const BYTE *encoded, - DWORD encoded_size) + DWORD encoded_size, FILETIME *next_update) { OCSP_RESPONSE_INFO *info; DWORD size, error = CRYPT_E_NO_REVOCATION_CHECK; @@ -1999,7 +1989,7 @@ static DWORD handle_ocsp_response(const CERT_INFO *cert, const CERT_INFO *issuer FIXME("unhandled response type %s\n", debugstr_a(info->pszObjId)); break; } - error = verify_signed_ocsp_response_info(cert, issuer, &info->Value); + error = verify_signed_ocsp_response_info(cert, issuer, &info->Value, next_update); break; default: @@ -2012,7 +2002,7 @@ static DWORD handle_ocsp_response(const CERT_INFO *cert, const CERT_INFO *issuer } static DWORD verify_cert_revocation_with_ocsp(const CERT_CONTEXT *cert, const WCHAR *base_url, - const CERT_REVOCATION_PARA *revpara) + const CERT_REVOCATION_PARA *revpara, FILETIME *next_update) { HINTERNET ses, con, req = NULL; BYTE *request_data = NULL, *response_data = NULL; @@ -2081,7 +2071,8 @@ static DWORD verify_cert_revocation_with_ocsp(const CERT_CONTEXT *cert, const WC !response_len || !(response_data = malloc(response_len)) || !InternetReadFile(req, response_data, response_len, &count) || count != response_len) goto done; - ret = handle_ocsp_response(cert->pCertInfo, revpara->pIssuerCert->pCertInfo, response_data, response_len); + ret = handle_ocsp_response(cert->pCertInfo, revpara->pIssuerCert->pCertInfo, response_data, response_len, + next_update); done: free(url); @@ -2093,7 +2084,8 @@ done: } static DWORD verify_cert_revocation_from_aia_ext(const CRYPT_DATA_BLOB *value, const CERT_CONTEXT *cert, - FILETIME *pTime, DWORD dwFlags, CERT_REVOCATION_PARA *pRevPara, CERT_REVOCATION_STATUS *pRevStatus) + FILETIME *pTime, DWORD dwFlags, CERT_REVOCATION_PARA *pRevPara, CERT_REVOCATION_STATUS *pRevStatus, + FILETIME *next_update) { BOOL ret; DWORD size, i, error = CRYPT_E_NO_REVOCATION_CHECK; @@ -2111,7 +2103,7 @@ static DWORD verify_cert_revocation_from_aia_ext(const CRYPT_DATA_BLOB *value, c { const WCHAR *url = aia->rgAccDescr[i].AccessLocation.u.pwszURL; TRACE("OCSP URL = %s\n", debugstr_w(url)); - error = verify_cert_revocation_with_ocsp(cert, url, pRevPara); + error = verify_cert_revocation_with_ocsp(cert, url, pRevPara, next_update); } else { @@ -2157,6 +2149,7 @@ static DWORD verify_cert_revocation(const CERT_CONTEXT *cert, FILETIME *pTime, DWORD dwFlags, CERT_REVOCATION_PARA *pRevPara, CERT_REVOCATION_STATUS *pRevStatus) { DWORD error = ERROR_SUCCESS; + FILETIME next_update = {0}; PCERT_EXTENSION ext; if (find_cached_revocation_status(&cert->pCertInfo->SerialNumber, pTime, pRevStatus)) @@ -2167,15 +2160,17 @@ static DWORD verify_cert_revocation(const CERT_CONTEXT *cert, FILETIME *pTime, if ((ext = CertFindExtension(szOID_AUTHORITY_INFO_ACCESS, cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) { - error = verify_cert_revocation_from_aia_ext(&ext->Value, cert, pTime, dwFlags, pRevPara, pRevStatus); + error = verify_cert_revocation_from_aia_ext(&ext->Value, cert, pTime, dwFlags, pRevPara, pRevStatus, + &next_update); TRACE("verify_cert_revocation_from_aia_ext() returned %08lx\n", error); - if (error == ERROR_SUCCESS || error == CRYPT_E_REVOKED) return error; + if (error == ERROR_SUCCESS || error == CRYPT_E_REVOKED) goto done; } if ((ext = CertFindExtension(szOID_CRL_DIST_POINTS, cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) { - error = verify_cert_revocation_from_dist_points_ext(&ext->Value, cert, pTime, dwFlags, pRevPara, pRevStatus); + error = verify_cert_revocation_from_dist_points_ext(&ext->Value, cert, pTime, dwFlags, pRevPara, pRevStatus, + &next_update); TRACE("verify_cert_revocation_from_dist_points_ext() returned %08lx\n", error); - if (error == ERROR_SUCCESS || error == CRYPT_E_REVOKED) return error; + if (error == ERROR_SUCCESS || error == CRYPT_E_REVOKED) goto done; } if (!ext) { @@ -2247,6 +2242,17 @@ static DWORD verify_cert_revocation(const CERT_CONTEXT *cert, FILETIME *pTime, error = CRYPT_E_NO_REVOCATION_CHECK; } } +done: + if ((next_update.dwLowDateTime || next_update.dwHighDateTime) + && (error == ERROR_SUCCESS || error == CRYPT_E_REVOKED)) + { + CERT_REVOCATION_STATUS rev_status; + + memset(&rev_status, 0, sizeof(rev_status)); + rev_status.cbSize = sizeof(rev_status); + rev_status.dwError = error; + cache_revocation_status(&cert->pCertInfo->SerialNumber, &next_update, &rev_status); + } return error; }
1
0
0
0
Alex Henrie : include: Add localtime_s.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: 88d6f8ac6c8e4303bbe0233b2109930a987bb03d URL:
https://gitlab.winehq.org/wine/wine/-/commit/88d6f8ac6c8e4303bbe0233b210993…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Fri Jan 13 18:38:14 2023 -0700 include: Add localtime_s. Needed to compile Tera Term. --- include/msvcrt/time.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index a6f80dfb56f..e1d914fea0d 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -97,6 +97,7 @@ static inline errno_t ctime_s(char *res, size_t len, const __time64_t *t) { retu static inline double difftime(time_t t1, time_t t2) { return _difftime64(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime64(t); } static inline struct tm* localtime(const time_t *t) { return _localtime64(t); } +static inline errno_t localtime_s(struct tm *res, const time_t *t) { return _localtime64_s(res, t); } static inline time_t mktime(struct tm *tm) { return _mktime64(tm); } static inline time_t time(time_t *t) { return _time64(t); } #elif defined(_UCRT) @@ -105,6 +106,7 @@ static inline errno_t ctime_s(char *res, size_t len, const __time32_t *t) { retu static inline double difftime(time_t t1, time_t t2) { return _difftime32(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime32(t); } static inline struct tm* localtime(const time_t *t) { return _localtime32(t); } +static inline errno_t localtime_s(struct tm *res, const time_t *t) { return _localtime32_s(res, t); } static inline time_t mktime(struct tm *tm) { return _mktime32(tm); } static inline time_t time(time_t *t) { return _time32(t); } #endif
1
0
0
0
Alex Henrie : include: Add ctime_s.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: 9844a694115c84ea0932a1e825bc066eff168ffe URL:
https://gitlab.winehq.org/wine/wine/-/commit/9844a694115c84ea0932a1e825bc06…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Fri Jan 13 18:38:14 2023 -0700 include: Add ctime_s. Needed to compile Tera Term. --- include/msvcrt/time.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index c0db38ff7a3..a6f80dfb56f 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -74,7 +74,9 @@ _ACRTIMP void __cdecl _tzset(void); _ACRTIMP char* __cdecl asctime(const struct tm*); _ACRTIMP clock_t __cdecl clock(void); _ACRTIMP char* __cdecl _ctime32(const __time32_t*); +_ACRTIMP errno_t __cdecl _ctime32_s(char*,size_t,const __time32_t*); _ACRTIMP char* __cdecl _ctime64(const __time64_t*); +_ACRTIMP errno_t __cdecl _ctime64_s(char*,size_t,const __time64_t*); _ACRTIMP double __cdecl _difftime32(__time32_t,__time32_t); _ACRTIMP double __cdecl _difftime64(__time64_t,__time64_t); _ACRTIMP struct tm* __cdecl _gmtime32(const __time32_t*); @@ -91,6 +93,7 @@ _ACRTIMP __time64_t __cdecl _time64(__time64_t*); #ifndef _USE_32BIT_TIME_T static inline char* ctime(const time_t *t) { return _ctime64(t); } +static inline errno_t ctime_s(char *res, size_t len, const __time64_t *t) { return _ctime64_s(res, len, t); } static inline double difftime(time_t t1, time_t t2) { return _difftime64(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime64(t); } static inline struct tm* localtime(const time_t *t) { return _localtime64(t); } @@ -98,6 +101,7 @@ static inline time_t mktime(struct tm *tm) { return _mktime64(tm); } static inline time_t time(time_t *t) { return _time64(t); } #elif defined(_UCRT) static inline char* ctime(const time_t *t) { return _ctime32(t); } +static inline errno_t ctime_s(char *res, size_t len, const __time32_t *t) { return _ctime32_s(res, len, t); } static inline double difftime(time_t t1, time_t t2) { return _difftime32(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime32(t); } static inline struct tm* localtime(const time_t *t) { return _localtime32(t); }
1
0
0
0
Alex Henrie : msvcrt: Change return type of _ctime32_s and _ctime64_s to errno_t.
by Alexandre Julliard
25 Jan '23
25 Jan '23
Module: wine Branch: master Commit: 261d7418a8a5d4809ad5033f10a3414f66b38beb URL:
https://gitlab.winehq.org/wine/wine/-/commit/261d7418a8a5d4809ad5033f10a341…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Fri Jan 13 18:38:14 2023 -0700 msvcrt: Change return type of _ctime32_s and _ctime64_s to errno_t. --- dlls/msvcrt/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index fb91aa2b1ec..56b80e84105 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -1715,7 +1715,7 @@ char * CDECL _ctime64(const __time64_t *time) /********************************************************************* * _ctime64_s (MSVCRT.@) */ -int CDECL _ctime64_s(char *res, size_t len, const __time64_t *time) +errno_t CDECL _ctime64_s(char *res, size_t len, const __time64_t *time) { struct tm *t; @@ -1744,7 +1744,7 @@ char * CDECL _ctime32(const __time32_t *time) /********************************************************************* * _ctime32_s (MSVCRT.@) */ -int CDECL _ctime32_s(char *res, size_t len, const __time32_t *time) +errno_t CDECL _ctime32_s(char *res, size_t len, const __time32_t *time) { struct tm *t;
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
47
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Results per page:
10
25
50
100
200