GCC's libssp does call CryptAcquireContextA; instead of just failing, do try to do the same as for CryptAcquireContextW. The string parameters aren't used in the winstorecompat implementation, so there's no point in trying to convert narrow strings to wide strings.
Signed-off-by: Martin Storsjö <[email protected]> --- mingw-w64-libraries/winstorecompat/src/Crypto.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-w64-libraries/winstorecompat/src/Crypto.c b/mingw-w64-libraries/winstorecompat/src/Crypto.c index dd3a99a98..349184861 100644 --- a/mingw-w64-libraries/winstorecompat/src/Crypto.c +++ b/mingw-w64-libraries/winstorecompat/src/Crypto.c @@ -73,7 +73,10 @@ BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCTSTR pszContainer, LPCTS BOOL WINAPI CryptAcquireContextA(HCRYPTPROV *phProv, LPCTSTR pszContainer, LPCTSTR pszProvider, DWORD dwProvType, DWORD dwFlags) { - return FALSE; + // The implementation of CryptAcquireContextW above disregards + // the pszContainer and pszProvider parameters anyway, so don't bother + // to convert them, just pass NULL. + return CryptAcquireContextW(phProv, NULL, NULL, dwProvType, dwFlags); } BOOL WINAPI CryptReleaseContext(HCRYPTPROV phProv, DWORD dwFlags) -- 2.25.1 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
