Mercurial > trustbridge
changeset 149:bd5a5d3e5674
We decided to use bool. So let's use it.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 24 Mar 2014 17:22:43 +0000 |
parents | 095d0e7f8ed4 |
children | a99339d0dce8 |
files | cinst/main.c cinst/windowsstore.c |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/cinst/main.c Mon Mar 24 17:21:25 2014 +0000 +++ b/cinst/main.c Mon Mar 24 17:22:43 2014 +0000 @@ -233,7 +233,7 @@ } #ifdef WIN32 - return install_certificates_win((const char**) to_install, 1); + return install_certificates_win((const char**) to_install, true); //remove_certificates_win((const char**) to_remove, 1); #endif
--- a/cinst/windowsstore.c Mon Mar 24 17:21:25 2014 +0000 +++ b/cinst/windowsstore.c Mon Mar 24 17:22:43 2014 +0000 @@ -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); }