mirror of
				https://github.com/pocoproject/poco.git
				synced 2025-10-26 02:18:04 +01:00 
			
		
		
		
	backported #2773: Fix the issue with incorrect type of store name parameter in CertOpenStore API call into NetSSL_Win
This commit is contained in:
		| @@ -167,7 +167,7 @@ void Context::loadCertificate() | |||||||
| 	if (!_hCertStore) | 	if (!_hCertStore) | ||||||
| 	{ | 	{ | ||||||
| 		if (_options & OPT_USE_MACHINE_STORE) | 		if (_options & OPT_USE_MACHINE_STORE) | ||||||
| 			_hCertStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, _certStoreName.c_str()); | 			_hCertStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, wcertStoreName.c_str()); | ||||||
| 		else | 		else | ||||||
| 			_hCertStore = CertOpenSystemStoreW(0, wcertStore.c_str()); | 			_hCertStore = CertOpenSystemStoreW(0, wcertStore.c_str()); | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -366,7 +366,7 @@ void X509Certificate::loadCertificate(const std::string& certName, const std::st | |||||||
| 	Poco::UnicodeConverter::convert(certStoreName, wcertStore); | 	Poco::UnicodeConverter::convert(certStoreName, wcertStore); | ||||||
| 	HCERTSTORE hCertStore; | 	HCERTSTORE hCertStore; | ||||||
| 	if (useMachineStore) | 	if (useMachineStore) | ||||||
| 		hCertStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, certStoreName.c_str()); | 		hCertStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, wcertStoreName.c_str()); | ||||||
| 	else | 	else | ||||||
| 		hCertStore = CertOpenSystemStoreW(0, wcertStore.c_str()); | 		hCertStore = CertOpenSystemStoreW(0, wcertStore.c_str()); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Günter Obiltschnig
					Günter Obiltschnig