summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift/client.cpp')
-rw-r--r--Sluift/client.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Sluift/client.cpp b/Sluift/client.cpp
index 813c180..997fd00 100644
--- a/Sluift/client.cpp
+++ b/Sluift/client.cpp
@@ -748,13 +748,17 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
++index;
if (!lua_isnoneornil(L, index)) {
pwd = Lua::checkString(L, index);
++index;
}
}
- getClient(L)->getClient()->setCertificate(boost::make_shared<PKCS12Certificate>(file, createSafeByteArray(pwd)));
+ if (file.empty()) {
+ getClient(L)->getClient()->setCertificate(CertificateWithKey::ref());
+ } else {
+ getClient(L)->getClient()->setCertificate(boost::make_shared<PKCS12Certificate>(file, createSafeByteArray(pwd)));
+ }
return 0;
}
SLUIFT_LUA_FUNCTION_WITH_HELP(
Client, jid,
"Returns the JID of this client",