https://bugs.winehq.org/show_bug.cgi?id=41604
Bug ID: 41604 Summary: Access violation in CertAddSerializedElementToStore Product: Wine Version: 1.9.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs@winehq.org Reporter: mterrisse@free.fr Distribution: ---
Hello,
I am trying to work around this bug https://bugs.winehq.org/show_bug.cgi?id=11070 (importpfx fails, needs PFXImportCertStore implementation).
On Windows (10, 1607) I serialize a certificate to a buffer with CertSerializeCertificateStoreElement, and write this buffer into a file. On Linux (Ubuntu 16.10, PlayOnLinux, Wine 1.9.10) I read the buffer from the file and I import it with CertAddSerializedElementToStore. -> It fails and GetLastError returns STATUS_ACCESS_VIOLATION.
I had a look at the code: in crypt32/serialize.c (1.9.21), CRYPT_ReadSerializedElement, you can read __EXCEPT_PAGE_FAULT { SetLastError(STATUS_ACCESS_VIOLATION); context = NULL; } __ENDTRY So there is really an access violation.