diff options
| author | Clifford Allan Jansen <cliffjansen@apache.org> | 2013-12-05 16:04:47 +0000 |
|---|---|---|
| committer | Clifford Allan Jansen <cliffjansen@apache.org> | 2013-12-05 16:04:47 +0000 |
| commit | 99023d40b640f426c01aae60e14462953276da5b (patch) | |
| tree | c6d935ca0de5da5d2367b7ba3559cf3310c2df7a /qpid/cpp | |
| parent | de71de664e9b4dc1b45fedee96ce787304e84a0a (diff) | |
| download | qpid-python-99023d40b640f426c01aae60e14462953276da5b.tar.gz | |
QPID-5396: map confusing registry GUI name to its real name: Personal -> My
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1548180 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/client/windows/SslConnector.cpp | 10 |
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); |
