From 2c771fa46e85a12d00cc1514b34a7d1281d87992 Mon Sep 17 00:00:00 2001 From: Fred Nicolson Date: Tue, 15 Jan 2019 13:12:16 +0000 Subject: [PATCH] Disable copying/moving of SSLContext --- include/frnetlib/SSLContext.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/frnetlib/SSLContext.h b/include/frnetlib/SSLContext.h index fa7b940..cf39e45 100644 --- a/include/frnetlib/SSLContext.h +++ b/include/frnetlib/SSLContext.h @@ -16,6 +16,11 @@ namespace fr class SSLContext { public: + SSLContext(SSLContext&)=delete; + SSLContext(SSLContext&&)=delete; + void operator=(SSLContext&&)=delete; + void operator=(const SSLContext&)=delete; + /*! * Initialises a new SSL context for use with SSL instances. * Will throw a std::runtime_error on failure. @@ -44,7 +49,8 @@ namespace fr } /*! - * Parses a list of x509 crt certificates from a location in memory + * Parses a list of x509 crt certificates from a location in memory. May be called + * multiple times to add more certificates to the chain. * * @param ca_certs The certificates to parse * @return True on success, false on failure. @@ -55,7 +61,8 @@ namespace fr } /*! - * Parses a list of x509 crt certificates from a location on disk + * Parses a list of x509 crt certificates from a location on disk. May be called + * multiple times to add more certificates to the chain. * * @param ca_certs_filepath The certificates to parse * @return True on success, false on failure