Skip to content

Fix the issue with incorrect type of store name parameter in CertOpenStore API call into NetSSL_Win#2773

Merged
obiltschnig merged 1 commit intopocoproject:developfrom
WebSpellChecker:use-wchar_t-in-CertOpenStore-api-call
Aug 22, 2019
Merged

Fix the issue with incorrect type of store name parameter in CertOpenStore API call into NetSSL_Win#2773
obiltschnig merged 1 commit intopocoproject:developfrom
WebSpellChecker:use-wchar_t-in-CertOpenStore-api-call

Conversation

@maxim-voronko
Copy link
Copy Markdown

@maxim-voronko maxim-voronko commented Aug 22, 2019

We were unable to load SSL certificates from the Windows certificate store with the OPT_USE_MACHINE_STORE option enabled.
During debugging, we found that the problem was in calling the Windows CertOpenStore API function.
According to the documentation, if you use the CERT_STORE_PROV_SYSTEM parameter, the pvPara parameter must point to a Unicode string that contains the name of the system storage. But in fact, the pvPara parameter pointed to the Ansi string.
Therefore, we changed the std::string certStoreName parameter to std::wstring wcertStore.
We checked this solution. Currently, we can load SSL certificates from the Windows certificate store with the OPT_USE_MACHINE_STORE option enabled.

@maxim-voronko maxim-voronko changed the title Replace type of certStoreName parameter from char * to whar_t * for C… Fix Issue with incorrect type of store name parameter in CertOpenStore API call into NetSSL_Win Aug 22, 2019
@maxim-voronko maxim-voronko changed the title Fix Issue with incorrect type of store name parameter in CertOpenStore API call into NetSSL_Win Fix the issue with incorrect type of store name parameter in CertOpenStore API call into NetSSL_Win Aug 22, 2019
@obiltschnig obiltschnig merged commit 5eb7652 into pocoproject:develop Aug 22, 2019
@obiltschnig obiltschnig self-assigned this Aug 22, 2019
@obiltschnig obiltschnig added this to the Release 1.10.0 milestone Aug 22, 2019
@obiltschnig
Copy link
Copy Markdown
Member

Also merged into poco-1.10.0 branch in 0784665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants