http://bugs.winehq.org/show_bug.cgi?id=58342
Bug ID: 58342 Summary: Loading/Generating SSL certificate for game server fails (PFXImportCertStore flags 00000100 not supported) Product: Wine Version: 10.9 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs@winehq.org Reporter: madbyte@tuta.io Distribution: ---
Created attachment 78719 --> http://bugs.winehq.org/attachment.cgi?id=78719 wine generate log with WINEDEBUG=+crypt
I'm trying to run an in-dev game server for SPTarkov: https://github.com/sp-tarkov/server-csharp
The software tries to generate a new cert via the following code: https://github.com/sp-tarkov/server-csharp/blob/main/Libraries/SPTarkov.Serv...
Compiling the server for Linux natively and running it works fine & a certificate.pfx file is created no issues.
When running the server through wine (main use case), cert creation fails with the following lines (see attached log ''):
01c4:trace:crypt:PFXIsPFXBlob (00007F2C1898A390) 01c4:trace:crypt:CryptQueryObject returning 1 01c4:fixme:crypt:PFXImportCertStore flags 00000100 not supported System.Security.Cryptography.CryptographicException: Success. at System.Security.Cryptography.X509Certificates.X509CertificateLoader.ImportPfx(ReadOnlySpan`1 data, ReadOnlySpan`1 password, X509KeyStorageFlags keyStorageFlags)
When generating a cert file via the Linux native server & then trying to run the windows server, I get the following lines:
01dc:trace:crypt:CryptQueryObject returning 1 01dc:fixme:thread:NtQueryInformationThread ThreadIdealProcessorEx info class - stub 01dc:fixme:thread:SetThreadIdealProcessorEx (FFFFFFFFFFFFFFFE 00007F2E5AB99EC0 00007F2E5AB99EC0): stub 01dc:fixme:crypt:PFXImportCertStore flags 00000100 not supported 01dc:fixme:thread:NtQueryInformationThread ThreadIdealProcessorEx info class - stub 01dc:fixme:thread:SetThreadIdealProcessorEx (FFFFFFFFFFFFFFFE 00007F2E5AB979F0 00007F2E5AB979F0): stub System.Security.Cryptography.CryptographicException: Success. at System.Security.Cryptography.X509Certificates.X509CertificateLoader.ImportPfx(ReadOnlySpan`1 data, ReadOnlySpan`1 password, X509KeyStorageFlags keyStorageFlags)
Since `01dc:fixme:crypt:PFXImportCertStore flags 00000100 not supported` is in both logs, it's possible that the `PKCS12_PREFER_CNG_KSP` flag might be the issue: https://github.com/wine-mirror/wine/blob/master/include/wincrypt.h#L3993
Thanks.