summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/WinRTEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceSSL/WinRTEngine.cpp')
-rwxr-xr-xcpp/src/IceSSL/WinRTEngine.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/IceSSL/WinRTEngine.cpp b/cpp/src/IceSSL/WinRTEngine.cpp
index b2bbf069e34..b955c8ce4a1 100755
--- a/cpp/src/IceSSL/WinRTEngine.cpp
+++ b/cpp/src/IceSSL/WinRTEngine.cpp
@@ -52,8 +52,23 @@ WinRTEngine::initialize()
//
// Load client certificate
//
+ const int passwordRetryMax = properties->getPropertyAsIntWithDefault("IceSSL.PasswordRetryMax", 3);
+ setPassword(properties->getProperty("IceSSL.Password"));
+
+ string certFile = properties->getProperty("IceSSL.CertFile");
string findCert = properties->getProperty("IceSSL.FindCert");
- if(!findCert.empty())
+ if(!certFile.empty())
+ {
+ _certificate = make_shared<IceSSL::Certificate>(importPersonalCertificate(
+ certFile,
+ [this]()
+ {
+ return password(false);
+ },
+ getPasswordPrompt != nullptr,
+ passwordRetryMax));
+ }
+ else if(!findCert.empty())
{
auto certs = findCertificates(properties->getPropertyWithDefault("IceSSL.CertStore", "My"), findCert);
if(certs->Size == 0)