On Wed Apr 29 10:16:22 2026 +0000, Dmitry Timoshkov wrote:
Hans, I'd appreciate to hear your opinion on this. Just in case to make things more clear about the application bug: https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cer... in the Remarks section states: The returned pointer is freed when passed as the pPrevCertContext parameter on a subsequent call. Otherwise, the pointer must be freed by calling CertFreeCertificateContext. A non-NULL pPrevCertContext passed to CertEnumCertificatesInStore is always freed even for an error.
Under Windows the sample code crashes for "My" store, but doesn't crash for an PKCS7 store, that probably implies that PKCS7 code path is different in Windows implementation. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10439#note_138180