TSDuck v3.45-4709
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::TLSConnectionBase Class Reference

Common properties for all forms of SSL/TLS connected sockets. More...

#include <tsTLSConnectionBase.h>

Inheritance diagram for ts::TLSConnectionBase:

Public Member Functions

virtual ~TLSConnectionBase ()
 Virtual destructor.
 
const UStringListadditionalServerNames () const
 For a client connection, get all addition host names for the server's certificate verification during connect().
 
void addVerifyServer (const UString &name)
 For a client connection, add another accepted host name for the server's certificate verification during connect().
 
const UStringserverName () const
 For a client connection, get the server name to be used in SNI (Server Name Indication).
 
void setArgs (const TLSArgs &args)
 Set command line arguments for the client.
 
void setServerName (const UString &server_name)
 For a client connection, specify the server name to be used in SNI (Server Name Indication).
 
void setVerifyPeer (bool on)
 Define if the peer's certificate shall be verified.
 
bool verifyPeer () const
 Check if the peer's certificate shall be verified.
 

Protected Member Functions

 TLSConnectionBase ()=default
 Constructor is accessible to subclasses only.
 

Detailed Description

Common properties for all forms of SSL/TLS connected sockets.

Member Function Documentation

◆ setArgs()

void ts::TLSConnectionBase::setArgs ( const TLSArgs args)

Set command line arguments for the client.

Parameters
[in]argsTLS arguments.

◆ setVerifyPeer()

void ts::TLSConnectionBase::setVerifyPeer ( bool  on)
inline

Define if the peer's certificate shall be verified.

Parameters
[in]onIf true, the peer's certificate will be verified.

◆ verifyPeer()

bool ts::TLSConnectionBase::verifyPeer ( ) const
inline

Check if the peer's certificate shall be verified.

Returns
True if the peer's certificate will be verified.

◆ setServerName()

void ts::TLSConnectionBase::setServerName ( const UString server_name)

For a client connection, specify the server name to be used in SNI (Server Name Indication).

Parameters
[in]server_nameMain server name, as specified in SNI (Server Name Indication). Also used to verify the server's certificate when setVerifyPeer() is true.

◆ serverName()

const UString & ts::TLSConnectionBase::serverName ( ) const
inline

For a client connection, get the server name to be used in SNI (Server Name Indication).

Returns
A constant reference to the main server name.

◆ addVerifyServer()

void ts::TLSConnectionBase::addVerifyServer ( const UString name)

For a client connection, add another accepted host name for the server's certificate verification during connect().

The list is reset by setServerName().

Parameters
[in]nameAdditional accepted host name used to verify the server's certificate.
See also
setServerName()

◆ additionalServerNames()

const UStringList & ts::TLSConnectionBase::additionalServerNames ( ) const
inline

For a client connection, get all addition host names for the server's certificate verification during connect().

Returns
A constant reference to all addition host names.

The documentation for this class was generated from the following file: