[PATCH] make CarbonPoker (previously Poker.com) client work.
Trent Waddington
trent.waddington at gmail.com
Mon Feb 5 21:13:47 CST 2007
These changes make the Carbon Poker (www.carbonpoker.com) client work.
Run the Carbon Poker installer; then
Run c:/windows/system32/Macromed/Flash/GetFlash.exe; then
Run c:/windows/CarbonPoker/Poker.exe
Screenshot: http://rtfm.insomnia.org/~qg/CarbonPoker-Ubuntu-wine.png
If someone would like to implement PKCS7 support in crypt32, this
patch could be much cleaner.
---
ChangeLog | 15 +++++++++++++++
dlls/crypt32/cert.c | 16 ++++++++++++++++
dlls/crypt32/crypt32.spec | 2 +-
dlls/crypt32/main.c | 12 +++++++++++-
dlls/crypt32/store.c | 4 ++++
dlls/usp10/usp10.c | 33 +++++++++++++++++++++++++++++++++
dlls/usp10/usp10.spec | 2 +-
dlls/wininet/http.c | 4 ++--
8 files changed, 83 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 658036c..297fb08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2007-02-06 Trent Waddington <trent.waddington at gmail.com>
+
+ * dlls/crypt32/cert.c:
+ dlls/crypt32/main.c:
+ dlls/crypt32/store.c:
+ dlls/crypt32/crypt32.spec:
+ crypt32: Hacks to make Macromedia's GetFlash.exe not complain
about the lack of PKCS7 support.
+
+ * dlls/usp10/usp10.c:
+ dlls/usp10/usp10.spec:
+ usp10: Implemented ScriptGetLogicalWidths.
+
+ * dlls/wininet/http.c:
+ wininet: Implement a feature of HttpOpenRequestA where
lpszAcceptTypes can be terminated with an empty string instead of a
NULL.
+
2007-01-24 Vitaliy Margolen <wine-patches at kievinfo.com>
* server/token.c:
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index b39c3ca..e3ed7e0 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -130,6 +130,10 @@ BOOL WINAPI
CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
{
TRACE("(%p)\n", pCertContext);
+ // HACK for GetFlash.exe
+ if (pCertContext == 0xdeadbeef)
+ return TRUE;
+
if (pCertContext)
Context_Release((void *)pCertContext, sizeof(CERT_CONTEXT),
CertDataContext_Free);
@@ -921,6 +925,12 @@ PCCERT_CONTEXT WINAPI
CertFindCertificateInStore(HCERTSTORE hCertStore,
TRACE("(%p, %d, %d, %d, %p, %p)\n", hCertStore, dwCertEncodingType,
dwFlags, dwType, pvPara, pPrevCertContext);
+ // HACK for GetFlash.exe
+ if (hCertStore == 0xdeadbeef) {
+ ret = 0xdeadbeef;
+ return ret;
+ }
+
switch (dwType >> CERT_COMPARE_SHIFT)
{
case CERT_COMPARE_ANY:
@@ -987,6 +997,12 @@ BOOL WINAPI
CertVerifySubjectCertificateContext(PCCERT_CONTEXT pSubject,
static const DWORD supportedFlags = CERT_STORE_REVOCATION_FLAG |
CERT_STORE_SIGNATURE_FLAG | CERT_STORE_TIME_VALIDITY_FLAG;
+ // HACK for GetFlash.exe
+ if (pSubject == 0xdeadbeef || pIssuer == 0xdeadbeef) {
+ *pdwFlags = 0;
+ return TRUE;
+ }
+
if (*pdwFlags & ~supportedFlags)
{
SetLastError(E_INVALIDARG);
diff --git a/dlls/crypt32/crypt32.spec b/dlls/crypt32/crypt32.spec
index 7ee23f4..705fb8f 100644
--- a/dlls/crypt32/crypt32.spec
+++ b/dlls/crypt32/crypt32.spec
@@ -118,7 +118,7 @@
@ stub CryptGetAsyncParam
@ stdcall CryptGetDefaultOIDDllList(long long ptr ptr)
@ stdcall CryptGetDefaultOIDFunctionAddress(long long wstr long ptr ptr)
-@ stub CryptGetMessageCertificates
+@ stdcall CryptGetMessageCertificates(long long long ptr long)
@ stub CryptGetMessageSignerCount
@ stdcall CryptGetOIDFunctionAddress(long long str long ptr ptr)
@ stdcall CryptGetOIDFunctionValue(long str str wstr ptr ptr ptr)
diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c
index dd9e1fb..80567ab 100644
--- a/dlls/crypt32/main.c
+++ b/dlls/crypt32/main.c
@@ -238,5 +238,15 @@ BOOL WINAPI
CryptVerifyMessageSignature(PCRYPT_VERIFY_MESSAGE_PARA pVerifyPara,
FIXME("stub: %p, %d, %p, %d, %p, %p, %p\n",
pVerifyPara, dwSignerIndex, pbSignedBlob, cbSignedBlob,
pbDecoded, pcbDecoded, ppSignerCert);
- return FALSE;
+ return TRUE;
+}
+
+HCERTSTORE WINAPI CryptGetMessageCertificates(DWORD dwMsgAndCertEncodingType,
+ HCRYPTPROV hCryptProv, DWORD dwFlags, const BYTE* pbSignedBlob,
+ DWORD cbSignedBlob)
+{
+ FIXME("stub: %d, %p, %d, %p, %d\n",
+ dwMsgAndCertEncodingType, hCryptProv, dwFlags, pbSignedBlob,
+ cbSignedBlob);
+ return 0xdeadbeef; // HACK for GetFlash.exe
}
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 8c8cda5..c82fcbc 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -2431,6 +2431,10 @@ BOOL WINAPI CertCloseStore(HCERTSTORE
hCertStore, DWORD dwFlags)
TRACE("(%p, %08x)\n", hCertStore, dwFlags);
+ // HACK for GetFlash.exe
+ if (hCertStore == 0xdeadbeef)
+ return TRUE;
+
if( ! hCertStore )
return TRUE;
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index c3b0a17..6f860e0 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -1553,6 +1553,39 @@ HRESULT WINAPI
ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS ssa, int *piD
}
/***********************************************************************
+ * ScriptGetLogicalWidths (USP10.@)
+ *
+ * Returns logical widths from an analysis.
+ *
+ * PARAMS
+ * psa [I] analysis.
+ * cChars [I] count of logical code points in the run.
+ * cGlyphs [I] count of glyphs in the run.
+ * piGlyphWidth [I] array of glyph advance widths.
+ * pwLogClust [I] array of logical clusters.
+ * psva [I] visual attributes.
+ * piDx [O] logical widths returned.
+ *
+ * RETURNS
+ * Success: S_OK
+ * Failure: a non-zero HRESULT.
+ */
+HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *psa, int cChars,
+ int cGlyphs, const int *piGlyphWidth, const WORD *pwLogClust,
+ const SCRIPT_VISATTR *psva, int *piDx)
+{
+ int i;
+
+ TRACE("%p, %d, %d, %p %p, %p, %p\n", psa, cChars, cGlyphs,
piGlyphWidth, pwLogClust, psva, piDx);
+
+ for (i = 0; i < cGlyphs; i++)
+ {
+ piDx[i] = piGlyphWidth[i];
+ }
+ return S_OK;
+}
+
+/***********************************************************************
* ScriptStringValidate (USP10.@)
*
* Validate a string analysis.
diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec
index df07f43..ac1506e 100644
--- a/dlls/usp10/usp10.spec
+++ b/dlls/usp10/usp10.spec
@@ -8,7 +8,7 @@
@ stdcall ScriptGetCMap(ptr ptr ptr long long ptr)
@ stdcall ScriptGetFontProperties(long ptr ptr)
@ stdcall ScriptGetGlyphABCWidth(ptr ptr long ptr)
-@ stub ScriptGetLogicalWidths
+@ stdcall ScriptGetLogicalWidths(ptr long long ptr ptr ptr ptr)
@ stdcall ScriptGetProperties(ptr long)
@ stdcall ScriptIsComplex(wstr long long)
@ stdcall ScriptItemize(wstr long long ptr ptr ptr ptr)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 8a34749..379b03e 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -803,11 +803,11 @@ HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
if (lpszAcceptTypes)
{
/* find out how many there are */
- while (lpszAcceptTypes[acceptTypesCount])
+ while (lpszAcceptTypes[acceptTypesCount] &&
*lpszAcceptTypes[acceptTypesCount])
acceptTypesCount++;
szAcceptTypes = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR
*) * (acceptTypesCount+1));
acceptTypesCount = 0;
- while (lpszAcceptTypes[acceptTypesCount])
+ while (lpszAcceptTypes[acceptTypesCount] &&
*lpszAcceptTypes[acceptTypesCount])
{
len = MultiByteToWideChar(CP_ACP, 0,
lpszAcceptTypes[acceptTypesCount],
-1, NULL, 0 );
--
1.4.4.3
More information about the wine-devel
mailing list