diff options
Diffstat (limited to 'Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp')
| -rw-r--r-- | Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp b/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp index a9ba5ab..12445fd 100644 --- a/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp +++ b/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp @@ -1,11 +1,11 @@ /* - * Copyright (c) 2010-2018 Isode Limited. + * Copyright (c) 2010-2019 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/TLS/OpenSSL/OpenSSLContextFactory.h> #include <openssl/bio.h> #include <openssl/dh.h> #include <openssl/pem.h> @@ -15,20 +15,20 @@ #pragma clang diagnostic ignored "-Wshorten-64-to-32" namespace Swift { bool OpenSSLContextFactory::canCreate() const { return true; } -std::unique_ptr<TLSContext> OpenSSLContextFactory::createTLSContext(const TLSOptions&, TLSContext::Mode mode) { - return std::unique_ptr<TLSContext>(new OpenSSLContext(mode)); +std::unique_ptr<TLSContext> OpenSSLContextFactory::createTLSContext(const TLSOptions& options, TLSContext::Mode mode) { + return std::make_unique<OpenSSLContext>(options, mode); } ByteArray OpenSSLContextFactory::convertDHParametersFromPEMToDER(const std::string& dhParametersInPEM) { ByteArray dhParametersInDER; auto bio = std::unique_ptr<BIO, decltype(&BIO_free)>(BIO_new(BIO_s_mem()), BIO_free); if (bio) { BIO_write(bio.get(), dhParametersInPEM.data(), dhParametersInPEM.size()); if (auto params = PEM_read_bio_DHparams(bio.get(), nullptr, nullptr, nullptr)) { |
Swift