summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-04-24 18:50:22 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-04-24 20:08:54 (GMT)
commit856f970d14c5c32b80fc5ea359d4e567b51578a0 (patch)
tree4e1d5574d94f90a6caf6e601b410597fb7184f7f /Swiften/TLS/Schannel/SchannelContextFactory.cpp
parente33b7a309e0424450ab00bc6180df95c6c049195 (diff)
downloadswift-contrib-856f970d14c5c32b80fc5ea359d4e567b51578a0.zip
swift-contrib-856f970d14c5c32b80fc5ea359d4e567b51578a0.tar.bz2
Re-enable revocation check.
Added a method on TLSContextFactory to disable revocation checks if wanted.
Diffstat (limited to 'Swiften/TLS/Schannel/SchannelContextFactory.cpp')
-rw-r--r--Swiften/TLS/Schannel/SchannelContextFactory.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Swiften/TLS/Schannel/SchannelContextFactory.cpp b/Swiften/TLS/Schannel/SchannelContextFactory.cpp
index 8ab7c6c..8b0044c 100644
--- a/Swiften/TLS/Schannel/SchannelContextFactory.cpp
+++ b/Swiften/TLS/Schannel/SchannelContextFactory.cpp
@@ -9,12 +9,22 @@
namespace Swift {
+SchannelContextFactory::SchannelContextFactory() : checkCertificateRevocation(true) {
+}
+
bool SchannelContextFactory::canCreate() const {
return true;
}
TLSContext* SchannelContextFactory::createTLSContext() {
- return new SchannelContext();
+ SchannelContext* context = new SchannelContext();
+ context->setCheckCertificateRevocation(checkCertificateRevocation);
+ return context;
}
+void SchannelContextFactory::setCheckCertificateRevocation(bool b) {
+ checkCertificateRevocation = b;
+}
+
+
}