diff options
Diffstat (limited to 'Swiften/TLS/TLSContextFactory.h')
-rw-r--r-- | Swiften/TLS/TLSContextFactory.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/Swiften/TLS/TLSContextFactory.h b/Swiften/TLS/TLSContextFactory.h index 5f08925..5f70541 100644 --- a/Swiften/TLS/TLSContextFactory.h +++ b/Swiften/TLS/TLSContextFactory.h @@ -1,21 +1,29 @@ /* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2010-2018 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ #pragma once +#include <memory> + +#include <Swiften/Base/API.h> +#include <Swiften/Base/ByteArray.h> +#include <Swiften/TLS/TLSContext.h> +#include <Swiften/TLS/TLSOptions.h> + namespace Swift { - class TLSContext; + class SWIFTEN_API TLSContextFactory { + public: + virtual ~TLSContextFactory(); - class TLSContextFactory { - public: - virtual ~TLSContextFactory(); + virtual bool canCreate() const = 0; - virtual bool canCreate() const = 0; + virtual std::unique_ptr<TLSContext> createTLSContext(const TLSOptions& tlsOptions, TLSContext::Mode = TLSContext::Mode::Client) = 0; + virtual void setCheckCertificateRevocation(bool b) = 0; + virtual void setDisconnectOnCardRemoval(bool b) = 0; - virtual TLSContext* createTLSContext() = 0; - virtual void setCheckCertificateRevocation(bool b) = 0; - }; + virtual ByteArray convertDHParametersFromPEMToDER(const std::string& pem); + }; } |