Wrong cancelation of the fix: incorrect type of store name parameter in CertOpenStore API call into NetSSL_Win.
I created next pull request: #2773
Then the fix was commited to release 1.10.0:
0784665
But then fix was canceled by next commit:
5d455b6#diff-0343c296dab285073bef69fa12352b2c
The cancelation was wrong.
The fact is that for CertOpenStore Windows API function does not exist CertOpenStoreW overload. According the documentation https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certopenstore if CertOpenStore function uses 'CERT_STORE_PROV_SYSTEM' parametr the pvPara parameter must point to a Unicode string that contains the name of the system storage. But in the commit 5d455b6#diff-0343c296dab285073bef69fa12352b2c
ANSI string was used.
If you want to use ANSI string here, please use CERT_STORE_PROV_SYSTEM_A parameter instead of CERT_STORE_PROV_SYSTEM.
We tested the issue. If we use 'CERT_STORE_PROV_SYSTEM' and ANSI string we can not use the Windows certificate store with the OPT_USE_MACHINE_STORE option enabled.
Now we use 'CERT_STORE_PROV_SYSTEM' parameter with Unicode string in our production and we can use Windows certificate store with the OPT_USE_MACHINE_STORE option enabled.