diff options
-rw-r--r-- | Sluift/client.cpp | 6 |
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 @@ -751,7 +751,11 @@ SLUIFT_LUA_FUNCTION_WITH_HELP( ++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; } |