[Bug 10506] .NET applications which use 'System.Security.Cryptography.DSA' fail to set up crypt32 DSS provider due to missing default key container

WineHQ Bugzilla wine-bugs at winehq.org
Mon Jul 5 03:57:13 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=10506

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|.NET applications which use |.NET applications which use
                   |'System.Security.Cryptograp |'System.Security.Cryptograp
                   |hy.DSA' need crypt32 DSS    |hy.DSA' fail to set up
                   |provider                    |crypt32 DSS provider due to
                   |                            |missing default key
                   |                            |container

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

revisiting, still present. Refining the summary to make it less "meta",
targeting the problem Hans mentioned in comment #21

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files (x86)/Keen Software House/Miner Wars

$ WINEDEBUG=+seh,+relay,+crypt,+dssenh wine ./MinerWarsLauncher_01_110_013.exe
-updater >>log.txt 2>&1

<switch to http via UI button>

...
0124:Call advapi32.CryptAcquireContextW(05bbee00,00000000,065e1048 L"Microsoft
Enhanced DSS and Diffie-Hellman Cryptographic Provider",0000000d,00000000)
ret=791cef64
0124:trace:crypt:CryptAcquireContextW (05BBEE00, (null), L"Microsoft Enhanced
DSS and Diffie-Hellman Cryptographic Provider", 13, 00000000) 
...
0124:Ret  PE DLL (proc=0EFA4540,module=0EFA0000
L"dssenh.dll",reason=PROCESS_ATTACH,res=00000000) retval=1 
...
0124:Call dssenh.CPAcquireContext(066be9f0,00000000,00000000,06686018)
ret=1000bf47 
...
0124:Call advapi32.RegOpenKeyExA(80000001,05bbe8a8
"Software\\Wine\\Crypto\\DSS\\focht",00000000,00020019,05bbe9d0) ret=0efa183a
...
0124:Ret  advapi32.RegOpenKeyExA() retval=00000002 ret=0efa183a
0124:Ret  dssenh.CPAcquireContext() retval=00000000 ret=1000bf47 
...
0124:Ret  advapi32.CryptAcquireContextW() retval=00000000 ret=791cef64 
...
0124:Call KERNEL32.GetLastError() ret=7919bf4a
0124:Ret  KERNEL32.GetLastError() retval=80090016 ret=7919bf4a
0124:Call advapi32.CryptAcquireContextW(05bbee00,00000000,066c7138 L"Microsoft
Enhanced DSS and Diffie-Hellman Cryptographic Provider",0000000d,f0000008)
ret=791cef64
0124:trace:crypt:CryptAcquireContextW (05BBEE00, (null), L"Microsoft Enhanced
DSS and Diffie-Hellman Cryptographic Provider", 13, f0000008) 
...
0124:Ret  PE DLL (proc=0EFA4540,module=0EFA0000
L"dssenh.dll",reason=PROCESS_ATTACH,res=00000000) retval=1 
...
0124:Call dssenh.CPAcquireContext(066be9f0,00000000,f0000008,06686018)
ret=1000bf47 
...
0124:fixme:dssenh:CPAcquireContext unsupported flags f0000008
0124:Ret  dssenh.CPAcquireContext() retval=00000000 ret=1000bf47 
...
0124:Ret  advapi32.CryptAcquireContextW() retval=00000000 ret=791cef64 
...
0124:Call KERNEL32.GetLastError() ret=7919bf4a
0124:Ret  KERNEL32.GetLastError() retval=0000007a ret=7919bf4a 
...
0124:trace:seh:dispatch_exception code=e0434352 flags=1 addr=7B0102F8
ip=7b0102f8 tid=0124
0124:trace:seh:dispatch_exception  info[0]=8007007a
0124:trace:seh:dispatch_exception  info[1]=00000000
0124:trace:seh:dispatch_exception  info[2]=00000000
0124:trace:seh:dispatch_exception  info[3]=00000000
0124:trace:seh:dispatch_exception  info[4]=79140000
0124:warn:seh:dispatch_exception unknown exception (code=e0434352) raised
0124:trace:seh:dispatch_exception  eax=05bbe964 ebx=00000005 ecx=05bbea54
edx=05bbea58 esi=00000005 edi=05bbe9d0
0124:trace:seh:dispatch_exception  ebp=05bbe9b8 esp=05bbe964 cs=7bc50023
ds=5bb002b es=7bc3002b fs=5bb0063 gs=006b flags=00000212
0124:trace:seh:call_vectored_handlers calling handler at 791F5A7C code=e0434352
flags=1 
...
--- snip ---

Launcher log:

--- snip ---
...
2021-07-05 09:44:41.844 - Thread:    5 ->  Launcher will download via HTTP,
bytes to download: 1120397147
2021-07-05 09:44:41.860 - Thread:    1 ->  Exception occured:
System.Security.Cryptography.CryptographicException: Insufficient buffer.

   at
System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32
hr)
   at System.Security.Cryptography.Utils._CreateCSP(CspParameters param,
Boolean randomKeyContainer, SafeProvHandle& hProv)
   at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters
parameters, Boolean randomKeyContainer)
   at System.Security.Cryptography.Utils.get_StaticDssProvHandle()
   at
System.Security.Cryptography.DSACryptoServiceProvider.ImportParameters(DSAParameters
parameters)
   at System.Security.Cryptography.DSA.FromXmlString(String xmlString)
   at MinerWars.Launcher.MyMainForm.RunBackgroundUpdater()
   at MinerWars.Launcher.MyMainForm.RunBackground(BackgroundWorker bw, Int32 a)
   at MinerWars.Launcher.MyMainForm.BackgroundThread_DoWork(Object sender,
DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
--- snip ---

https://github.com/microsoft/referencesource/blob/5697c29004a34d80acdaf5742d7e699022c64ecd/mscorlib/system/security/cryptography/utils.cs#L206

https://source.winehq.org/git/wine.git/blob/12d33d21d33788fd46898ea42e9592d33b6e7c8e:/dlls/dssenh/main.c#l265

$ wine --version
wine-6.12

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