http://bugs.winehq.org/show_bug.cgi?id=28798
Bug #: 28798 Summary: GearoticMotion.exe: Getting NTE_BAD_DATA calling crypt32.dll Product: Wine Version: 1.3.30 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: crypt32 AssignedTo: wine-bugs@winehq.org ReportedBy: allistar.m@gmail.com Classification: Unclassified
Created attachment 36996 --> http://bugs.winehq.org/attachment.cgi?id=36996 Output with WINEDEBUG=+crypt
wine --version returns: wine-1.3.30
A demo version of GeareoticMotion is available from:
http://www.gearotic.com/downloads.html
After installing GearotiMotion using the installer, when running GearoticMotion with this command:
wine GearoticMotion.exe
I get an error message (in a UI dialog) saying "Importation Error 80090005 Contact Support". I assume this is an error coded into GearoticMotion itself. This does not happen when running the application on Windows. 80090005 is NTE_BAD_DATA.
The output from wine is attached when running:
WINEDEBUG=+relay,+crypt wine GearoticMotion.exe
This is running from an amd64 install of Gentoo linux, Wine is compiled with these USE flags:
USE="X alsa cups dbus fontconfig gecko gphoto2 jpeg lcms mp3 ncurses nls%* opengl oss perl png ssl threads truetype win32 win64 xcomposite xinerama -capi -custom-cflags -gnutls -gsm (-gstreamer) -hardened -ldap -openal -opencl% -samba -scanner -test -v4l -xml (-esd%) (-jack%) (-nas%) (-pulseaudio%)"
This error is preventing the application from opening an encrypted license file which causes it to think it is unregistered, disabling some key features. This error is reproducible even with no license file.
http://bugs.winehq.org/show_bug.cgi?id=28798
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.gearotic.com/dow | |nloads.html
--- Comment #1 from Austin English austinenglish@gmail.com 2011-10-18 20:17:23 CDT --- Does `winetricks crypt32` help?
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #2 from allistar.m@gmail.com 2011-10-18 20:20:11 CDT --- No, I've tried that and it makes no difference to the result or the output. I've also tried with using the built-in or the native crypt32 library with no difference.
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #3 from allistar.m@gmail.com 2011-10-18 20:52:52 CDT --- More information:
The UI message box that appears (that says "Importation Error 80090005 Contact Support") appears just after this line is output:
trace:crypt:import_key blob type: 7
and before this line:
trace:crypt:CryptReleaseContext (0x130830, 00000000)
I assume that means it's the call to import_key that's failing with an 80090005 error.
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #4 from allistar.m@gmail.com 2011-10-26 17:29:21 CDT --- I have spoken to the developer of the application about this and here is the code that is throwing that error:
if (!CryptImportKey(hCryptProv, pbPrivateKey, 595, 0, 0, &hKey)) { // Error strEncryptedFile.Format( _T(" Importation Error %x Contact Support."), GetLastError() ); MessageBox( strEncryptedFile ); return 1; }
Is there any reason why this works on Windows but not under Wine?
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #5 from Juan Lang juan.lang@gmail.com 2011-10-26 18:01:39 CDT --- I ran it with a debug patch (which I'll attach in a sec), and it appears that rsaenh is expecting the input buffer to be one byte longer than it is:
err:crypt:import_private_key blob too short for pub key: expect 596, got 595
I don't know what the reason for the error is, whether it's an application bug that Microsoft expects, or whether it's a logic bug in rsaenh.
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #6 from Juan Lang juan.lang@gmail.com 2011-10-26 18:02:56 CDT --- Created attachment 37142 --> http://bugs.winehq.org/attachment.cgi?id=37142 Patch: Add error messages for failed private key imports
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #7 from Juan Lang juan_lang@yahoo.com 2011-10-31 10:42:59 CDT --- (In reply to comment #5)
I don't know what the reason for the error is, whether it's an application bug that Microsoft expects, or whether it's a logic bug in rsaenh.
It appears that the app is just broken. According to tests I'm writing, nearly all Windows versions fail with this key too: only NT4 incorrectly doesn't check the size of the input buffer. What version of Windows did you try this on?
http://bugs.winehq.org/show_bug.cgi?id=28798
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|crypt32 |rsaenh Summary|GearoticMotion.exe: Getting |GearoticMotion.exe: Getting |NTE_BAD_DATA calling |NTE_BAD_DATA importing a |crypt32.dll |key
--- Comment #8 from Juan Lang juan_lang@yahoo.com 2011-10-31 10:44:35 CDT --- Also, this has nothing to do with crypt32.dll. (CryptImportKey is in advapi32.dll. The implementation is in rsaenh.dll.)
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #9 from Juan Lang juan_lang@yahoo.com 2011-10-31 11:12:32 CDT --- (In reply to comment #7)
It appears that the app is just broken. According to tests I'm writing, nearly all Windows versions fail with this key too: only NT4 incorrectly doesn't check the size of the input buffer. What version of Windows did you try this on?
I spoke too soon: you're right, Windows accepts this key even with a small buffer, even though it doesn't accept others. Weird. More investigation needed.
http://bugs.winehq.org/show_bug.cgi?id=28798
--- Comment #10 from Juan Lang juan_lang@yahoo.com 2011-10-31 13:37:36 CDT --- Patches sent: http://www.winehq.org/pipermail/wine-patches/2011-October/108379.html http://www.winehq.org/pipermail/wine-patches/2011-October/108380.html http://www.winehq.org/pipermail/wine-patches/2011-October/108382.html
http://bugs.winehq.org/show_bug.cgi?id=28798
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |2d658db553f1c9df313a4bfcd2c | |06618997ef5e6 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #11 from Austin English austinenglish@gmail.com 2011-11-01 13:27:23 CDT --- (In reply to comment #10)
Patches sent: http://www.winehq.org/pipermail/wine-patches/2011-October/108379.html http://www.winehq.org/pipermail/wine-patches/2011-October/108380.html http://www.winehq.org/pipermail/wine-patches/2011-October/108382.html
http://source.winehq.org/git/wine.git/commitdiff/54b972e2fcdc34c09387d359b5d... http://source.winehq.org/git/wine.git/commitdiff/f0e2cba471824e5c6228b062cb6... http://source.winehq.org/git/wine.git/commitdiff/2d658db553f1c9df313a4bfcd2c...
http://bugs.winehq.org/show_bug.cgi?id=28798
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Alexandre Julliard julliard@winehq.org 2011-11-04 14:14:04 CDT --- Closing bugs fixed in 1.3.32.