Nets v3.0.0
SslContext Struct Referencefinal

Secure socket layer (SSL) context instance handle. More...

#include <socket.hpp>

Public Member Functions

 SslContext (const SslContext &)=delete
 SslContext (SslContext &&r) noexcept
SslContext & operator= (SslContext &)=delete
SslContext & operator= (SslContext &&r) noexcept
 SslContext () noexcept
 Creates a new empty socket SSL context.
 SslContext (const char *certificateFilePath, const char *certificatesDirectory=nullptr)
 Creates a new public socket SSL context.
 SslContext (const char *certificateFilePath, const char *privateKeyFilePath, bool certificateChain=false)
 Creates a new private socket SSL context.
 ~SslContext ()
 Destroys socket SSL context instance.
void destroy () noexcept
 Destroys socket SSL context instance.
SslContext_TgetInstance () const noexcept
 Returns socket SSL context view instance.
 operator bool () const noexcept
 Returns true if socket SSL context view is not null.

Protected Attributes

SslContext_Tinstance = nullptr

Detailed Description

Secure socket layer (SSL) context instance handle.

See the socket.h

Constructor & Destructor Documentation

◆ SslContext() [1/2]

SslContext ( const char * certificateFilePath,
const char * certificatesDirectory = nullptr )
inline

Creates a new public socket SSL context.

See the createPublicSslContext().

Parameters
[in]certificateFilePathcertificate file path string or nullptr
[in]certificatesDirectorycertificates directory path string or nullptr
Exceptions
Errorwith a NetsResult string on failure.

◆ SslContext() [2/2]

SslContext ( const char * certificateFilePath,
const char * privateKeyFilePath,
bool certificateChain = false )
inline

Creates a new private socket SSL context.

See the createPrivateSslContext().

Parameters
[in]certificateFilePathcertificates file path string
[in]privateKeyFilePathprivate key file path string
certificateChainfile path is certificate chain
Exceptions
Errorwith a NetsResult string on failure.

◆ ~SslContext()

~SslContext ( )
inline

Destroys socket SSL context instance.

See the destroySslContext().

Member Function Documentation

◆ destroy()

void destroy ( )
inlinenoexceptinherited

Destroys socket SSL context instance.

See the destroySslContext().