Mercurial > trustbridge
diff cinst/windowsstore.c @ 158:fb3b2d77518f
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 09:30:51 +0100 |
parents | bd5a5d3e5674 |
children | a4b1c77f3e6a |
line wrap: on
line diff
--- a/cinst/windowsstore.c Tue Mar 25 09:30:42 2014 +0100 +++ b/cinst/windowsstore.c Tue Mar 25 09:30:51 2014 +0100 @@ -25,17 +25,15 @@ return bufPtr; } -int install_certificates_win(const char **to_install, int user_store) +int install_certificates_win(const char **to_install, bool user_store) { int i = 0; HCERTSTORE hStore = NULL; if (user_store) { - // Access user store hStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, L"Root"); } else { - // Access machine store hStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"Root"); } @@ -85,6 +83,7 @@ i++; free(buf); } + if(hStore) { CertCloseStore(hStore, 0); }