https://bugs.winehq.org/show_bug.cgi?id=47038 --- Comment #2 from tijs96(a)hotmail.com --- I don't have a windows machine to test right now, but the documentation suggests wine is correct in returning an error. The documentation for the NTE_BAD_KEYSET error code says: "The key container could not be opened. A common cause of this error is that the key container does not exist. To create a key container, call CryptAcquireContext using the CRYPT_NEWKEYSET flag." https://docs.microsoft.com/en-us/windows/desktop/api/wincrypt/nf-wincrypt-cr... The application never makes a call with that flag set. The application might be relying on *phProv getting set to null when an error occurs. In that case CryptGenRandom would also just return an error instead of crashing. Example code on https://docs.microsoft.com/en-us/windows/desktop/SecCrypto/example-c-program... also checks for that error and tries again with the CRYPT_NEWKEYSET flag. -- 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.