diff options
Diffstat (limited to 'Swiften/TLS/Schannel/SchannelContext.cpp')
| -rw-r--r-- | Swiften/TLS/Schannel/SchannelContext.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Swiften/TLS/Schannel/SchannelContext.cpp b/Swiften/TLS/Schannel/SchannelContext.cpp index 5f230ec..70ff7dd 100644 --- a/Swiften/TLS/Schannel/SchannelContext.cpp +++ b/Swiften/TLS/Schannel/SchannelContext.cpp | |||
| @@ -21,7 +21,7 @@ namespace Swift { | |||
| 21 | 21 | ||
| 22 | //------------------------------------------------------------------------ | 22 | //------------------------------------------------------------------------ |
| 23 | 23 | ||
| 24 | SchannelContext::SchannelContext(bool tls1_0Workaround) : state_(Start), secContext_(0), myCertStore_(NULL), certStoreName_("MY"), certName_(), smartCardReader_(), checkCertificateRevocation_(true), tls1_0Workaround_(tls1_0Workaround) { | 24 | SchannelContext::SchannelContext(bool tls1_0Workaround) : state_(Start), secContext_(0), myCertStore_(NULL), certStoreName_("MY"), certName_(), smartCardReader_(), checkCertificateRevocation_(true), tls1_0Workaround_(tls1_0Workaround), disconnectOnCardRemoval_(true) { |
| 25 | contextFlags_ = ISC_REQ_ALLOCATE_MEMORY | | 25 | contextFlags_ = ISC_REQ_ALLOCATE_MEMORY | |
| 26 | ISC_REQ_CONFIDENTIALITY | | 26 | ISC_REQ_CONFIDENTIALITY | |
| 27 | ISC_REQ_EXTENDED_ERROR | | 27 | ISC_REQ_EXTENDED_ERROR | |
| @@ -625,7 +625,9 @@ bool SchannelContext::setClientCertificate(CertificateWithKey::ref certificate) | |||
| 625 | 625 | ||
| 626 | //------------------------------------------------------------------------ | 626 | //------------------------------------------------------------------------ |
| 627 | void SchannelContext::handleCertificateCardRemoved() { | 627 | void SchannelContext::handleCertificateCardRemoved() { |
| 628 | indicateError(boost::make_shared<TLSError>(TLSError::CertificateCardRemoved)); | 628 | if (disconnectOnCardRemoval_) { |
| 629 | indicateError(boost::make_shared<TLSError>(TLSError::CertificateCardRemoved)); | ||
| 630 | } | ||
| 629 | } | 631 | } |
| 630 | 632 | ||
| 631 | //------------------------------------------------------------------------ | 633 | //------------------------------------------------------------------------ |
| @@ -680,5 +682,9 @@ void SchannelContext::setCheckCertificateRevocation(bool b) { | |||
| 680 | checkCertificateRevocation_ = b; | 682 | checkCertificateRevocation_ = b; |
| 681 | } | 683 | } |
| 682 | 684 | ||
| 685 | void SchannelContext::setDisconnectOnCardRemoval(bool b) { | ||
| 686 | disconnectOnCardRemoval_ = b; | ||
| 687 | } | ||
| 688 | |||
| 683 | 689 | ||
| 684 | } | 690 | } |
Swift