summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-03-23 16:00:24 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-12 13:49:48 (GMT)
commit0bf6afc5c01b9eb3024a8cfd04bfd743890db4f6 (patch)
treeca480f6b8e27afa97ade97ca7a13b11502b21f31 /Swiften/TLS/Schannel/SchannelContext.h
parentd5f885dd9aa65d18145a99826a1c30aeb62aca8e (diff)
downloadswift-contrib-0bf6afc5c01b9eb3024a8cfd04bfd743890db4f6.zip
swift-contrib-0bf6afc5c01b9eb3024a8cfd04bfd743890db4f6.tar.bz2
Tidy up of assorted Schannel/CAPI stuffs.
Makes Swift disconnect if a smartcard used for auth is removed. Fixes compilation. Changes code style in a few places.
Diffstat (limited to 'Swiften/TLS/Schannel/SchannelContext.h')
-rw-r--r--Swiften/TLS/Schannel/SchannelContext.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/Swiften/TLS/Schannel/SchannelContext.h b/Swiften/TLS/Schannel/SchannelContext.h
index bce7415..7c2601b 100644
--- a/Swiften/TLS/Schannel/SchannelContext.h
+++ b/Swiften/TLS/Schannel/SchannelContext.h
@@ -4,14 +4,21 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2012 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
#pragma once
-#include "Swiften/Base/boost_bsignals.h"
+#include <Swiften/Base/boost_bsignals.h>
-#include "Swiften/TLS/TLSContext.h"
-#include "Swiften/TLS/Schannel/SchannelUtil.h"
-#include "Swiften/TLS/CertificateWithKey.h"
-#include "Swiften/Base/ByteArray.h"
+#include <Swiften/TLS/TLSContext.h>
+#include <Swiften/TLS/Schannel/SchannelUtil.h>
+#include <Swiften/TLS/CertificateWithKey.h>
+#include <Swiften/Base/ByteArray.h>
+#include <Swiften/TLS/TLSError.h>
#define SECURITY_WIN32
#include <Windows.h>
@@ -23,6 +30,7 @@
namespace Swift
{
+ class CAPICertificate;
class SchannelContext : public TLSContext, boost::noncopyable
{
public:
@@ -50,7 +58,9 @@ namespace Swift
private:
void determineStreamSizes();
void continueHandshake(const SafeByteArray& data);
- void indicateError();
+ void indicateError(boost::shared_ptr<TLSError> error);
+ //FIXME: Remove
+ void indicateError() {indicateError(boost::make_shared<TLSError>());}
void handleCertError(SECURITY_STATUS status) ;
void sendDataOnNetwork(const void* pData, size_t dataSize);
@@ -90,5 +100,6 @@ namespace Swift
std::string m_cert_name;
////Not needed, most likely
std::string m_smartcard_reader; //Can be empty string for non SmartCard certificates
+ boost::shared_ptr<CAPICertificate> userCertificate;
};
}