summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/client/windows/SslConnector.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/client/windows/SslConnector.cpp b/qpid/cpp/src/qpid/client/windows/SslConnector.cpp
index a9d8a1d0df..4f4ef4f559 100644
--- a/qpid/cpp/src/qpid/client/windows/SslConnector.cpp
+++ b/qpid/cpp/src/qpid/client/windows/SslConnector.cpp
@@ -212,11 +212,15 @@ void SslConnector::loadPrivCertStore()
// Get a handle to the system store or pkcs#12 file
qpid::sys::ssl::SslOptions& opts = qpid::sys::ssl::SslOptions::global;
if (opts.certFilename.empty()) {
- // opening the system store
- const char *store = opts.certStore.empty() ? "MY" : opts.certStore.c_str();
+ // opening a system store, names are not case sensitive
+ std::string store = opts.certStore.empty() ? "my" : opts.certStore;
+ std::transform(store.begin(), store.end(), store.begin(), ::tolower);
+ // map confusing GUI name to actual registry store name
+ if (store == "personal")
+ store = "my";
certStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_A, 0, NULL,
CERT_STORE_OPEN_EXISTING_FLAG | CERT_STORE_READONLY_FLAG |
- CERT_SYSTEM_STORE_CURRENT_USER, store);
+ CERT_SYSTEM_STORE_CURRENT_USER, store.c_str());
if (!certStore) {
HRESULT status = GetLastError();
clientCertError.set(Msg() << "Could not open system certificate store: " << store, status);