[Bug 33742] UPlay 3.x/4.x needs native crypt32

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Jun 12 15:15:10 CDT 2014


http://bugs.winehq.org/show_bug.cgi?id=33742

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net

--- Comment #30 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming the SSL cert validation problem.

Most issues here are completely unrelated, please avoid messing up the bug with
different things.

Without 'crypt32.dll' override, 'Uplay.exe' hangs in a loop:

--- snip ----
Wine-dbg>bt 0x6a
Backtrace:
=>0 0x7e11821b CertGetIssuerCertificateFromStore+0xa(hCertStore=0x1941c8,
pSubjectContext=0x1972e4, pPrevIssuerContext=(nil), pdwFlags=0x6c6666c)
[/home/focht/projects/wine/wine.repo/src/dlls/crypt32/cert.c:1863] in crypt32
(0x06c66720)
  1 0x00b404c1 in uplay (+0x7404c0) (0x06c66720)
  2 0x00b3e12e in uplay (+0x73e12d) (0x06c66794)
  3 0x00b3eff3 in uplay (+0x73eff2) (0x06c6e5a8)
  4 0x00b3f4ab in uplay (+0x73f4aa) (0x06c6e600)
  5 0x00b3c3c4 in uplay (+0x73c3c3) (0x06c6e6d4)
  6 0x00b3cb4a in uplay (+0x73cb49) (0x06c6e76c)
  7 0x00b34aae in uplay (+0x734aad) (0x06c6e9d0)
  8 0x00b3376a in uplay (+0x733769) (0x06c6e9e8)
  9 0x00b1e862 in uplay (+0x71e861) (0x06c6ea58)
  10 0x7bc86780 call_thread_func_wrapper+0xb() in ntdll (0x06c6ea68)
  11 0x7bc867c9 call_thread_func+0x3e(entry=0xb1e7a0, arg=0x6249730,
frame=0x6c6eb68)
[/home/focht/projects/wine/wine.repo/src/dlls/ntdll/signal_i386.c:2630] in
ntdll (0x06c6eb48)
  12 0x7bc8675e call_thread_entry_point+0x11() in ntdll (0x06c6eb68)
--- snip ---

Relevant part of trace log:

--- snip ---
...
005d:Call KERNEL32.CreateProcessW(00000000,0033e5a8 L"C:\\Program
Files\\Ubisoft\\Ubisoft Game Launcher\\Uplay.exe -gamelauncher_wait_handle 228
-upc_uplay_id 802 -upc_game_version 1 -upc_exe_path
QzpcUHJvZ3JhbSBGaWxlc1xTdGVhbVxTdGVhbUFwcHNcY29tbW9uXENoaWxkIG9mIExpZ2h0IERlbW9cQ2hpbGRvZkxpZ2h0LmV4ZQ==
-upc_working_directory
QzpcUHJvZ3JhbSBGaWxlc1xTdGVhbV"...,00000000,00000000,00000000,00000410,00000000,00132ea0
L"C:\\Program Files\\Ubisoft\\Ubisoft Game Launcher\\",0033dc60,0033dc50)
ret=7e8f51e2 
...
005f:Call KERNEL32.__wine_kernel_init() ret=7bc5a4b2
...
005d:Ret  KERNEL32.CreateProcessW() retval=00000001 ret=7e8f51e2
...
006f:Call
secur32.InitializeSecurityContextA(0ad28fd0,067e46a4,00000000,0001801c,00000000,00000000,07406800,00000000,00000000,0740680c,07406848,074067f8)
ret=00ab646a
...
006f:Ret  secur32.InitializeSecurityContextA() retval=00000000 ret=00ab646a
...
006f:Call secur32.QueryContextAttributesA(067e46a4,00000053,07406734)
ret=00ab55b2
...
006f:Ret  secur32.QueryContextAttributesA() retval=00000000 ret=00ab55b2
...
006f:Call crypt32.CertDuplicateCertificateContext(001b1cec) ret=00ab78f4
006f:trace:crypt:CertDuplicateCertificateContext (0x1b1cec)
006f:Ret  crypt32.CertDuplicateCertificateContext() retval=001b1cec
ret=00ab78f4
...
<loop start>
...
006f:Call
crypt32.CertGetIssuerCertificateFromStore(001acb00,001afc1c,00000000,0740666c)
ret=00ab7981
006f:trace:crypt:CertGetIssuerCertificateFromStore (0x1acb00, 0x1afc1c, (nil),
00000000)
006f:trace:crypt:CertFindCertificateInStore (0x1acb00, 00010001, 00000000,
000c0000, 0x1afc1c, (nil))
006f:trace:crypt:CertFindExtension "2.5.29.1" 3 0x1b2f78
006f:trace:crypt:CertFindExtension "2.5.29.35" 3 0x1b2f78
006f:trace:crypt:CryptDecodeObjectEx (0x00010001, #001f, 0x1b2fd8, 24,
0x00008001, (nil), 0x74064e0, 0x74064fc)
...
006f:trace:crypt:CryptDecodeObjectEx returning 1
006f:trace:crypt:CertEnumCertificatesInStore (0x1acb00, (nil))
006f:trace:crypt:MemStore_enumCert (0x1acb00, (nil))
006f:trace:crypt:CertGetCertificateContextProperty (0x1afc1c, 20, (nil),
0x7406450)
006f:trace:crypt:CertContext_GetProperty (0x1afc00, 20, (nil), 0x7406450)
006f:trace:crypt:ContextPropertyList_FindProperty (0x1afc38, 20, 0x7406378)
006f:trace:crypt:CertContext_GetProperty returning 1
006f:trace:crypt:CertGetCertificateContextProperty returning 1
...
006f:trace:crypt:CertGetCertificateContextProperty (0x1afc1c, 20, 0x1b3070,
0x7406450)
006f:trace:crypt:CertContext_GetProperty (0x1afc00, 20, 0x1b3070, 0x7406450)
006f:trace:crypt:ContextPropertyList_FindProperty (0x1afc38, 20, 0x7406378)
006f:trace:crypt:CertContext_GetProperty returning 1
006f:trace:crypt:CertGetCertificateContextProperty returning 1
...
006f:trace:crypt:CertFindCertificateInStore returning 0x1afc1c
006f:trace:crypt:CertGetIssuerCertificateFromStore returning 0x1afc1c
006f:Ret  crypt32.CertGetIssuerCertificateFromStore() retval=001afc1c
ret=00ab7981
006f:Call crypt32.CertFreeCertificateContext(001afc1c) ret=00ab798a
006f:trace:crypt:CertFreeCertificateContext (0x1afc1c)
006f:Ret  crypt32.CertFreeCertificateContext() retval=00000001 ret=00ab798a
...
<loop end, repeats endlessly> 
--- snip ---

The app code specifically checks with 'GetLastError' for 'CRYPT_E_SELF_SIGNED'
after return from 'CertGetIssuerCertificateFromStore' (root certificate in
hierarchy must always be self-signed).
It doesn't look at 'pdwFlags' out parameter at all hence it's not a condition
to exit the loop.

MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa376085%28v=vs.85%29.aspx

--- quote ---
CRYPT_E_SELF_SIGNED

The issuer certificate is the same as the subject certificate. It is a
self-signed root certificate.
--- quote ---

It should probably check for that and set the error code accordingly (also
returning NULL).

I did a small test and it allowed 'UPlay' to succeed without any overrides (SSL
established -> update check/download and login successful).

$ wine --version
wine-1.7.19-154-g80a29e2

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list