http://bugs.winehq.org/show_bug.cgi?id=32758
--- Comment #18 from Anastasius Focht focht@gmx.net 2013-01-27 13:47:18 CST --- Hell folks,
callstack for managed code:
--- snip --- (2a.2b): CLR exception - code e0434352 (first chance) ... OS Thread Id: 0x2b (0) Child SP IP Call Site 0033e048 7b83aa73 [HelperMethodFrame: 0033e048] 0033e098 06d02a85 System.Data.SqlServerCe.SqlCeSHA256.Initialize() 0033e0b0 06d026e4 System.Data.SqlServerCe.SqlCeSHA256..ctor() 0033e0c0 06d025b4 System.Data.SqlServerCe.HashProvider.CalculateHash(System.String) 0033e0f4 06d02532 System.Data.SqlServerCe.HashProvider.MatchHash(System.String) 0033e108 06d0246f System.Data.SqlServerCe.NativeMethods.IsValidBinary(System.String) 0033e114 06d02446 System.Data.SqlServerCe.NativeMethods.ValidateNativeBinary(System.String) 0033e11c 06d02225 System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(System.String) 0033e158 06d0211d System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(System.String) 0033e168 06d01fa2 System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() 0033e1a0 06d01d86 System.Data.SqlServerCe.SqlCeEngine..ctor() 0033e1b0 06d01d41 System.Data.SqlServerCe.SqlCeEngine..ctor(System.String) 0033e1c0 06d008e0 Intuit.Spc.Esd.Client.DataAccess.Specific.SqlServerCEPersistenceHelper.Intuit.Spc.Esd.Client.DataAccess.Portable.IPersistenceHelper.CreateDatabase() 0033e1ec 06d00459 Intuit.Spc.Esd.Client.DataAccess.Portable.PersistenceManager.InstallPersistentStore(System.String) 0033e1fc 06d003f4 Intuit.Spc.Esd.Client.DataAccess.Portable.PersistenceManager.InstallOrUpgradePersistentStore(System.String) 0033e20c 06d046e5 Intuit.Spc.Esd.Client.DataAccess.Portable.GlobalPersistenceManager.TryInstallOrUpgradePersistentStore() 0033e234 06d0468e Intuit.Spc.Esd.Client.DataAccess.Portable.GlobalPersistenceManager.get_Instance() 0033e238 06d04585 Intuit.Spc.Esd.Client.DataAccess.Portable.SettingsDataAccessor..ctor() 0033e248 06d0453d Intuit.Spc.Esd.WinClient.Api.Configuration.GlobalSettings..ctor() 0033e258 06d043a6 Intuit.Spc.Esd.WinClient.Api.Configuration.ApplicationSettings..ctor(System.String) 0033e268 06d03626 Intuit.Spc.Esd.WinClient.Api.Internal.Logging.ApiLogger.LogSystemErrorEvent(System.String, System.Exception) 0033e2c8 06d034be Intuit.Spc.Esd.WinClient.Api.Internal.Logging.ApiLogger.Error(System.Exception) 0033e2d8 06d001ef Intuit.Spc.Esd.WinClient.Api.RegistrationManager.Register(Intuit.Spc.Esd.WinClient.Api.ApplicationDescriptor) 0033e3b0 06d40360 Intuit.Ctg.Wte.Service.Delivery.eDelivery.RegisterTurboTaxComponents() 0033e3d8 06cc5a5d Intuit.Ctg.Wte.Service.Delivery.eDelivery.Startup(System.Windows.Forms.IWin32Window) 0033e40c 06bd038d Intuit.Ctg.Wte.UseCase.Startup.StartupUseCaseController.Run(Intuit.Ctg.Wte.UseCase.Startup.InitializeMainHandler, System.Windows.Window, System.Action`1<System.String>) 0033e5bc 068cf642 TurboTax.ViewModel.MainViewModel.Initialize(System.Windows.Window, System.Action`1<System.String>) 0033e61c 068a3259 TurboTax.MainWin..ctor(System.String[], System.Windows.Window, System.Action`1<System.String>, System.Action) 0033e65c 05da29e1 TurboTax.App.Application_Startup(System.Object, System.Windows.StartupEventArgs) --- snip ---
The relevant C# code (extracted using reflector):
--- snip --- internal SqlCeSHA256() { string provider = "Microsoft Enhanced RSA and AES Cryptographic Provider"; if ((Environment.OSVersion.Version.Major == 5) && (Environment.OSVersion.Version.Minor == 1)) { provider = "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"; } this.InitFields(provider, ProviderType.RsaAes, AlgorithmId.Sha256); } --- snip ---
It seems that provider name is special, it only exists on Windows XP.
--- snip --- private void InitFields(string provider, ProviderType providerType, AlgorithmId algorithm) { this.m_algorithmId = algorithm; this.m_cspHandle = AcquireCsp(null, provider, providerType, CryptAcquireContextFlags.None | CryptAcquireContextFlags.VerifyContext); this.Initialize(); }
... public override void Initialize() { HashSafeHandle phHash = null; if (!UnsafeNativeMethods.CryptCreateHash(this.m_cspHandle, this.m_algorithmId, 0, 0, out phHash)) { int hr = Marshal.GetLastWin32Error(); if (hr == -2146893816) { throw new PlatformNotSupportedException(); } throw new CryptographicException(hr); } if (this.m_hashHandle != null) { this.m_hashHandle.Dispose(); } this.m_hashHandle = phHash; } --- snip ---
Setting WinVer to "Windows 2003" works around, leading to next bug (missing IsInternetESCEnabled in 'shlwapi.dll').
If you set WinVer too high (Vista/Win7) you'll run into different bugs (insufficient dwmapi required for WPF4/MIL).
Regards