summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/TLS/Schannel/SchannelContextFactory.cpp')
-rw-r--r--Swiften/TLS/Schannel/SchannelContextFactory.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/TLS/Schannel/SchannelContextFactory.cpp b/Swiften/TLS/Schannel/SchannelContextFactory.cpp
index 6e83b0d..c2587c5 100644
--- a/Swiften/TLS/Schannel/SchannelContextFactory.cpp
+++ b/Swiften/TLS/Schannel/SchannelContextFactory.cpp
@@ -15,7 +15,7 @@
namespace Swift {
-SchannelContextFactory::SchannelContextFactory() : checkCertificateRevocation(true) {
+SchannelContextFactory::SchannelContextFactory() : checkCertificateRevocation(true), disconnectOnCardRemoval(true) {
}
bool SchannelContextFactory::canCreate() const {
@@ -25,6 +25,7 @@ bool SchannelContextFactory::canCreate() const {
TLSContext* SchannelContextFactory::createTLSContext(const TLSOptions& tlsOptions) {
SchannelContext* context = new SchannelContext(tlsOptions.schannelTLS1_0Workaround);
context->setCheckCertificateRevocation(checkCertificateRevocation);
+ context->setDisconnectOnCardRemoval(disconnectOnCardRemoval);
return context;
}
@@ -32,5 +33,8 @@ void SchannelContextFactory::setCheckCertificateRevocation(bool b) {
checkCertificateRevocation = b;
}
+void SchannelContextFactory::setDisconnectOnCardRemoval(bool b) {
+ disconnectOnCardRemoval = b;
+}
}