You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cl...@apache.org on 2013/12/05 17:04:47 UTC

svn commit: r1548180 - /qpid/trunk/qpid/cpp/src/qpid/client/windows/SslConnector.cpp

Author: cliffjansen
Date: Thu Dec  5 16:04:47 2013
New Revision: 1548180

URL: http://svn.apache.org/r1548180
Log:
QPID-5396: map confusing registry GUI name to its real name: Personal -> My

Modified:
    qpid/trunk/qpid/cpp/src/qpid/client/windows/SslConnector.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/client/windows/SslConnector.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/windows/SslConnector.cpp?rev=1548180&r1=1548179&r2=1548180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/windows/SslConnector.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/windows/SslConnector.cpp Thu Dec  5 16:04:47 2013
@@ -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);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org